Printing Styles

In this lesson, we will look at different ways to print text to the screen in Java.

In the last lesson, we used System.out.println to print Hello World! to the screen. There are a couple of other ways to print text on the screen. Let’s take a look at each of them.


You can break the println statement into print and ln (short for line). As apparent from the name, println prints the complete text literal to the screen in the form of a line. The cursor moves to the next line after printing the text.

Get hands-on with 1200+ tech skills courses.