// CopyToken.java -- read space-separated strings from the standard input stream import java.util.Scanner; /* * System.in (java.io.InputStream) is the standard input * System.out (java.io.PrintStream) is the standard output */ public final class CopyToken { public static void main(final String[] args) { final Scanner stdin = new Scanner(System.in, "US-ASCII"); // Read the standard input stream while (stdin.hasNext()) { final String s = stdin.next(); // get the next token from input System.out.println(s); // write the string to output } } }