Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

array list

807598Jul 24 2006 — edited Jul 24 2006
hi,

here is the source code:

List[ ][ ] ite = new ArrayList[82][5];

int count1 =0;

int count2 = 0;

Iterator iter = query.iterate();

ro = (ReadOracle) iter.next();

while(iter.hasNext()){

// PROBLEM PART
ite[count1][count2].add((int)count1);
ite.add(count1,[count1][count2]);
count2++;

ite[count1][count2].add((String)ro.getobjid);


count1++;
count2 = 0;

//END OF PROBLEM PART

ro = (ReadOracle) iter.next();

}//end of while


Above I try to add an integer to Array List which has rows and columns.
I also read from database and the Array List will get Strings,too.
For this reason I have no chance to declare the type of Array List, so
could you show me a way to write Strings and integers that is read from database to the array list that is initialized in two dimension.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2006
Added on Jul 24 2006
1 comment
142 views