![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Well, I was going to keep my mouth shut, but since you've solicited opions, I'll give one: it is poor (if not uncommon) coding style to put so many operations in a single line. It doesn't create more optimized code, it is harder to read(especially for beginners) and it is harder to debug. If you try to keep one operation per line, then the exceptions you get are very helpful and specific. If you separated the contents your while() test into a few lines, your problem would immediately reveal itself. - mfg
> probably u should change the code to be like this : >
> yup, BufferedReader.readLine() will return null if it reaches end of file, but, when it returns null, u can't call the method equals() because null has no such method ;) > probably it ends the application completely because of NullPointerException. > any differing opinions?
Replies:
|
Sponsored Links
|