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 thejava.langpackage that provides access to system-level resources. -
out– A static member of theSystemclass. It is an object ofPrintStreamthat represents the standard output stream. -
println()– A method of thePrintStreamclass 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!