Fixed syntax error on EOF in Java