Redirecting Standard Input/Output
To support the standard input and output devices (usually the keyboard and screen), Java defines two stream objects that you can use in your programs without having to create stream objects of your own. The System.in object (instantiated from the InputStream class) enables your programs to read data from the keyboard, whereas the System.out object (instantiated from the PrintStream class) routes output to the computer's screen. You can use these stream objects directly to handle standard input and output in your Java programs, or you can use them as the basis for other stream objects you might want to create.
These streams, like other streams, can be redirected to cause the input and output to be read ...
Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.