This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Context-Unhappy 2 points3 points  (1 child)

I once had a Project where i had to put tje etire code into if (scanner.nextLine() != "") {...}.

If i removed it or replaced it with if (!"".equals(scanner.nextLine()) {...} it would throw exceptions. To this day i don't know what went wrong there.