codice:
import java.io.*;

class IO {
public static void main(String args[]) throws Exception {
FileReader fr = new FileReader("NomeFile.txt");
BufferedReader br = new BufferedReader(fr);
String s;
while((s = br.readLine()) != null) {
System.out.println(s);
}
fr.close();
}
}
semplice ed efficace