| Author |
Reading Text file data into an array
|
Mahesh Lohi
Ranch Hand
Joined: Jun 22, 2009
Posts: 150
|
|
Hi all,
I would like to know if I can read the text file data into an array. Each word in my text file should be stored into array.
Thank you in advance..
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
You would have to count the lines first, then you know what size of array to use. Then reading into the array is quite easy.
Might be better to read into a List<String> then convert the List to an array, because that saves you the counting.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Reading Text file data into an array
|
|
|