Challenge: Print More Messages!

You’re off to a great start with your first Java program!

Right now, your code prints a single line:

System.out.println("Hello, world!");

Your task

Add two more lines to your program to print any new messages you like. This will help you get comfortable with Java’s basic output command.

Example output

Hello, world!
Let’s learn Java.
Line by line.

You can customize the messages to say whatever you want—get creative!

Challenge: Print More Messages!

You’re off to a great start with your first Java program!

Right now, your code prints a single line:

System.out.println("Hello, world!");

Your task

Add two more lines to your program to print any new messages you like. This will help you get comfortable with Java’s basic output command.

Example output

Hello, world!
Let’s learn Java.
Line by line.

You can customize the messages to say whatever you want—get creative!

Java
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
// Add two more print statements below:
}
}