Java Arena
Step 3 of 5

print and println

System.out.println prints its text and then ends the line, so the next output starts on a new line. Its sibling System.out.print prints the text and stays on the same line, so the next output continues right after it.

System.out.print("Loading");
System.out.print("...");
System.out.println(" done");
System.out.println("Next line");
Output
Loading... done
Next line

print never adds a space by itself. The space before done is there because it is inside the quotes.

An empty line

System.out.println() with nothing between the parentheses prints nothing and ends the line. That gives an empty line, or finishes a line that print started.

System.out.println("First paragraph.");
System.out.println();
System.out.println("Second paragraph.");
Output
First paragraph.

Second paragraph.

Your task

Challenge 1 of 3

Choose print or println for the two blanks so the program prints exactly:

Compiling... done!
Running.

Challenge 2

The text has two paragraphs, but they run together. Add an empty line between them, using System.out.println() with nothing inside the parentheses. The output should be:

Step one: write the code.
Step two: press Check.

If a test fails, read the message,
fix the code and press Check again.

Challenge 3

Build the first line from three print calls, one for Ready, , one for set, and one for go!, and then end the line. The whole output should be:

Ready, set, go!
Race started.