Hi Chris,
I get the inverse of what you get ie
NullPointerException when no blank lines present at the EOF &
No exception when the file has a blank line at the end .
Blank line or no lines present the problems crops from the while loop -
When EOF is encountered line is set to null .
At this point we are still trying to run a method on line(which has now become a null refernce) with the following expression
line=(theinput.readLine().trim())
This causes the NullPointerException.
Correct me if I'm wrong.
Ashish
[This message has been edited by Ashish Hareet (edited August 28, 2001).]