When I said, 'Where ... refers to the code after the line String s = inFile.readLine();' I meant all of the code. A loop will allow for a set of instructions to be executed 0, 1 or more times. If all you want to repeat is reading the data from the file, then that leaves you with only processing the last line of the file.
You need to read in the data and process it and that's what needs to be repeated and thus placed in a loop.
Anyway, what do you mean by, 'at the start of my boolean?' Please use the [code=java] so line numbers appear. That way you can tell us which line the error occurred. The expression in the while loop is not incorrect and would compile.
Regardless, by looking at your code I can see that you're missing some braces. Particularly, you don't close the for loop nor do you close the main method. This is why you're getting the error.
Last edited by PoovenM; Dec 18th, 2008 at 9:49 am.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.