bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Output println() Method

❮ Output Methods

Example

System.out.println("Hello World!");
System.out.println("I will print a new line.");

Definition and Usage

The println() method prints text or values to the console, followed by a new line.

This method is often preferred over the print() method, as the new line makes the output of code easier to read.

Syntax

System.out.println( argument );

Parameter Values

ParameterDescription
argumentA value or text that should be printed to the console

Technical Details

Returns:No return value.

Previous

Java Output printf() Method

Next

Java Arrays Class