Java - built-in Java statement

System.out.println is a built-in Java statement used to print text or values to the console (also called the standard output). It’s one of the most commonly used statements for debugging or displaying messages.

Breakdown of the Statement:

  • System – A built-in class in the java.lang package that provides access to system-level resources.

  • out – A static member of the System class. It is an object of PrintStream that represents the standard output stream.

  • println() – A method of the PrintStream class that prints the content followed by a new line.

Example 

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}

Output:

Hello, World!