By Tony Bevis on Monday, 09 October 2023
Category: Java

Java programming course: 5.2 Understanding System.out.println

In the previous lesson we looked at static members.

Understanding System.out.println()

You have several times used the System.out.println() statement to send text to the Output window, and its syntax looks slightly unusual in that there are two dots. If you look at the API for the System class, you will see the following:


You can therefore read the statement as being: "Invoke the println() method of the out static variable that is a PrintStream object that exists within the System class".

In the next lesson you will learn about Java constants.

Next lesson: 5.3 Constants

Related Posts

Leave Comments