public class Main { public static void main(String[] args) throws Exception {
BufferedReader bufferedReader = new BufferedReader(new FileReader("yourFile.txt"));
String line = null; while ((line = bufferedReader.readLine()) != null) {
System.out.println(line);
}
bufferedReader.close();
}
}