Integer.parseInt problem....
package readtext;
import java.io.*;// For input & output classes
import java.util.Date;// For the Date class
publicclass create_table{
public create_table(){
}
publicstaticvoid main(String[] args)
throws IOException{
{
//Read from file
BufferedReader in =new BufferedReader(
new FileReader("C:/Documents and Settings/seng/Desktop/testfile/VehicleNode.txt"));
int out;
String text;
while((text = in.readLine()) !=null)
{
out = Integer.parseInt(text);
System.out.println(out);
}
in.close();
}
}
}
the compliar giving me tis running error....does any1 know how can i solve it?
java.lang.NumberFormatException: For input string:"3 10 3"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:477)
at java.lang.Integer.parseInt(Integer.java:518)
at readtext.create_table.main(create_table.java:42)
Exception in thread"main"
Java Result: 1

