anitha vani wrote:I am novice and also new member to this community can you please tell me how to keep code tags here?
David Sharpe wrote:According to the API, java.io.BufferedReader.readLine() will return null if the end of the stream has been reached, in which case tokens=(br.readLine()).split(" "); would throw an NPE since you can't call split a null.
In addition to David Newton's formatting concerns, I'm worried that 230 lines of code have been written without individually testing any of it. A beginner should write 5 lines of code, test it thoroughly, and then write 5 more (use methods). I'm sorry if I'm wrong and that's exactly what you've done, but that's not how it looks.