Well.. You're right but i don't know the content in text file because of that i can't use
<JAVA>String line = "m 25 68";</JAVA>
If i know.. and text file have 10.000 person what can i do ?
Type: Posts; User: jjava
Well.. You're right but i don't know the content in text file because of that i can't use
<JAVA>String line = "m 25 68";</JAVA>
If i know.. and text file have 10.000 person what can i do ?
i don't know how can i create an object in the text file.. How can i get line by line informations from the text file.. These are important if first line is "m" i must be create man object or first...
My question how can i read the data from a text file?
your answer not relited my question :( but thanks.
try {
InputStream fis = new FileInputStream("person.txt");
Scanner scanner = new Scanner(fis);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
String[] pieces = line.split("...
Hi all.. i have a text file it names "person.txt" ...
This is content of person.txt :
***********
m 25 68
g 35 55
g 23 65
m 19 56
m 40 75