I\'ve tried some ways to detect EOF in my code, but it still not working. I\'ve tried using BufferedReader, Scanner, and using char u001a to flag the EOF, but still not make
This is what I did
Scanner s = new Scanner(f); //f is the file object while(s.hasNext()) { String ss = s.nextLine(); System.out.println(ss); }
Worked for me