//Code example for the classic program "cat" that reads one line //at a time from the standard input and prints it to the standard output //till end of file (stream) import java.lang.*; import java.io.*; public class Cat { public static void main(String[] args) { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String line; try { while ((line = input.readLine()) != null) System.out.println(line); } catch (IOException ignored) {} } // end main }