File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

arrays with arraylist

 
vijayapriya thirumurugan
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic