Curriculum
Course: Java Basic
Login

Curriculum

Java Basic

Java Home

0/1

Java Introduction

0/1

Java Get Started

0/1

Java Syntax

0/1

Java Comments

0/1

Java Type Casting

0/1

Java Operators

0/1

Java Booleans

0/1

Java Switch

0/1

Java Break / Continue

0/1

Java Errors and Exception

0/1
Text lesson

println()

Example

Display some text in the console, then proceed with a new line.

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

Definition and Usage

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

It’s commonly favored over the print() method because the automatic new line enhances code readability.

Syntax

System.out.println(argument);

Parameter Values

Parameter

Description

arguement

A value or text intended for console printing

Technical Details

Returns:

No return value.