how to store the data read from the txt file, and store it into different array?
for example,
name,age,address
i know how to read them differently, but don know how to store it... :cry:
FileReader fr = new FileReader("abc.txt");
input = new BufferedReader(fr);
line = input.readLine();
while (line != null)
{
StringTokenizer tokens =
new StringTokenizer(line, ", \t");
String token;
while(tokens.hasMoreTokens())
{
token = tokens.nextToken();
System.out.println(token); /* trying to see what is the output, but donno how to store it to different array*/
}
line = input.readLine();
}
input.close();
}