View Single Post
Join Date: Oct 2008
Posts: 37
Reputation: l_03 has a little shameless behaviour in the past 
Solved Threads: 0
l_03 l_03 is offline Offline
Light Poster

Re: How to make an array in text file (help..)

 
0
  #7
Nov 17th, 2008
for (line = lnr.readLine(); line!=null; line = lnr.readLine()){

String account[] = line.split(" ");

//print whatever you want
//and do whatever you want with the elements:
//account[0], account[1], account[2], account[3], account[4]

}

hello, i have tried what you told me...

but when i print
System.out.println(account[0]);

it prints the whole line which is:

12345 1234 200000 Jerry Lopez

i think this is a two dimensional array...

i only want to print out the 12345...but i am really confused either....

thank you in advance........
Reply With Quote