import java.io.*; // for BufferedReader, InputStreamReader, IOException, etc. /** * A simple Java program that says echos anything the user types * until Ctrl-D is pressed. */ public class Echo { /** * Every Java program needs a "main" method. * @param args Any additional strings that were included on the command line. */ public static void main ( String [] args ) throws IOException { // Display "Hello World!" if no additional strings were passed. String input = stdin.readLine(); while ( null != input ) { System.out.println( input ); input = stdin.readLine(); } } private static final BufferedReader stdin = new BufferedReader( new InputStreamReader( System.in ) ); }