PrintStream is actually a kind of filteroutputstream
public class PrintStream extends Filteroutputstream implements Appendable, closeable
Directly known subclasses:
LogStream is obsolete. No alternative version
PrintStream
Public PrintStream (OutputStream out,
Boolean AutoFlush) to create a new print stream.
Parameters:
Out-the output stream to which the values and objects will be printed
Autoflush-boolean variable; If true, the output buffer is flushed whenever a byte array is written, one of the println methods is called, or a newline character or byte (' \ n ') is written
In addition to the filteroutputstream of Write,flush and other methods, is a big push of the Print method
Special PrintStream:
System. In ———— key is already open
public static final InputStream in "standard" input stream. This stream is open and ready to provide input data. Typically, this stream corresponds to keyboard input or another input source specified by the host environment or user.
Out
public static final PrintStream out "standard" output stream. This stream is open and ready to accept output data. Typically, this stream corresponds to the display output or another output target specified by the host environment or user.
Err
public static final PrintStream err "standard" error output stream. This stream is open and ready to accept output data.
Typically, this stream corresponds to the display output or another output target specified by the host environment or user
Understanding of Java PrintStream