import java.io.*; class TestRead { public static void main(String[] args) throws Exception{ BufferedReader r = new BufferedReader( new FileReader("rfile.txt")); String str; while ((str = r.readLine()) != null) { System.out.println(str); } } }