java end of file program code example Example: java character for end of file String iHaveAnEof = "file ends here\u001a";