permaculture playing cards*
The moose likes Beginning Java and the fly likes arrays with arraylist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "arrays with arraylist" Watch "arrays with arraylist" New topic
Author

arrays with arraylist

vijayapriya thirumurugan
Greenhorn

Joined: Apr 03, 2009
Posts: 16


Hello sir,

This is my problem sir:

I have note pad which contains 1,2,3 (It's in first row) 1,3,4 (It's in second row).Like this i have 100000 of rows. i want the arraylist{1} if i read the first value 1(It's in first row) and i want this arraylist {1} should be stored in the two dimension array called array[1][1]. i want the arraylist{1} if i read the first value 2(It's in first row) and i want this arraylist {1} should be stored in the two dimension array called array[2][2]. Like this i want to fill the first row. And comes to second row, i want store the arraylist{1} if i read the first value 1(It's in first row) and i want this arraylist {1,2} should be updated in the two dimension array called array[1][1]. Like this i want to update all element with the corresponding arraylist. finally, it should come in the form of matrix. can you help me. i'm struggling a lot sir, is this possible. if it is not possible give me relevant idea. but i need in the form of matrix. i'm waiting.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3826

Your problem is not clear to me. What is this arraylist{1..} you are talking about? What I understand is you have a text file which contains lines of numbers of the form(1,2,3....). And you want to store them/use them in the java program. If so, you can use arrays(rather arrays of arrays) directly. Read each line of the text file and put those elements in each row of the array. Where have you got stuck?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
Don't get me started about those stupid light bulbs.
 
subject: arrays with arraylist