Writing to Standard Output

System.out.println("Hello, World!");

System.out is a PrintStream that will write output to the standard output. This is typically the console. System.out is one of the three streams that Java defines to connect with the standard operating system’s streams. The other streams are the System.in and the System.err streams—for reading from standard input and writing to standard error.

The System.out stream is probably the most often used of all the standard operating system streams. System.out has been put to use by nearly every programmer to assist with debugging an application. Because this stream writes to the console, it makes a handy tool to see what’s going on at a particular point in your application. In general though, ...

Get Java™ Phrasebook 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.