...

/

Project: Print More Messages!

Project: Print More Messages!

Print more messages with this Java project.

We'll cover the following...

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:
}
}

Great job! You’ve completed your first Java output project.

What’s next?

You’ve said hello. Next: make Java do math—and become your own calculator!

Ask