InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String readline; while ((readline=br.readLine())!= null) { System.out.println(readline); }