|
|
||||||
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
1.17 Text Screen OutputIn Java, textual output to the terminal can be produced by using the following statements:
Besides System.out, there also exists System.err, which refers to the same screen for output, but prints to a different stream. When the output of a command or program is redirected using the > (greater than) operator, then this refers to output generated by the standard output of a program (i.e. System.out). Messages from the standard error of a program (i.e. System.err) are not affected, and are still printed to the screen without being sent into the redirected output. System.err is used in a similar fashion as System.out:
Certain escape characters can be used to further format output from System.out or System.err, by including them in the printed string:
|
||||||||||||||||||||||||||