Get startedGet started for free

Printing out

Printing text is one of the first steps in Java programming. It helps display messages, debug code, and interact with users.

Complete the program to print a welcome message!

This exercise is part of the course

Introduction to Java

View Course

Exercise instructions

  • Replace ____ with the correct Java keyword for printing - println.

Tip: you can view the Slides in the output window. On mobile, click on the three horizontal lines.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

class WelcomeToJava {

    public static void main(String[] args) {
    
    	// Replace the ____ below with the necessary keyword
    	System.out.____("Welcome to Java!");
   }
}
Edit and Run Code