i am reading from file the file is in this format
4
L 100 20 30 200
R 30 20 50 100
O 20 100 100 40
L 30 50 100 100
I'm using string tokenizer now the 4 specifies how many lines I'll have
When I read only the last 2 lines are shown pleas can any one now what is the mistake....thanks in advance.
This is the code:
Try{
Scanner scan= new Scanner(inputFile);
String N= scan.println(N):
While(scan.hasNext())
{
String record=scan.nextLine();
StringTokenizer st= new StringTokenizer(record);
String shape=st.nextToken;
...and so one for the rest of the parameters
}
}