Are you
sure it compiles?
Take a look at the
BufferedReader documentation and see if the read() method is really the best one to use for your purposes.
Oh, and there
are logic errors in there too. First, what will happen to your while loop when your program reads in the zero on the second-to-last line of your input file? What if there were more non-negative numbers after that? (Or if the zero was the first number in your input file)
The rest of them you'll find pretty easily yourself when you get it to run.
Good luck!
- Jeff
[ April 13, 2005: Message edited by: Jeff Jetton ]
[ April 13, 2005: Message edited by: Jeff Jetton ]