This is not an empty string. It just looks like Eclipse.
When you see an empty line in Eclipse, it means that the last line of the file ends with a new line character. That is, the last characters in your Java file are probably }\n (in * nix, with the end of the LF line) or }\r\n (end of the CRLF lines in Windows), in each case, follow the end of the file.
You can prove it to yourself using tail or cat on * nix. If the prompt appears on the same line as the last line of code, then there is no new ending line. If the prompt appears on a separate line, a new line character appears. If there is an empty line before the invitation, then there will be an empty line in the file.
If the above does not convince you, use the hex editor: o) The empty line will appear as two consecutive lines: \n\n or \r\n\r\n (in * nix and windows, respectively).
There is nothing wrong with the last line of your file having a new line character at the end. In fact, it is a good idea to leave it there, because some tools will warn if this is not the case. These tools include Checkstyle (there is an Eclipse Checkstyle plugin ) and diff .
Eclipse allows you to place the cursor there if you want to add new content to the end of the file. (This is often not required in Java because most people do not put more than one top-level type in a file.)
It is best to leave it there and get used to Eclipse by showing it.
source share