×

java · level 1 · unit 1 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Lines run in order, one after another.

A program can have lots of lines. Java runs them in order, top to bottom, like ticking off a shopping list. Everything your program shows on the screen is called its .

An empty System.out.println() has nothing to show, so you get a blank line. It is handy for spacing things out.

println moves to a new line after showing its text. Its cousin , with no ln, stays on the same line, so the next text carries straight on.

public class Main {
    public static void main(String[] args) {
        System.out.println("Ready");
        System.out.println("Steady");
        System.out.println();
        System.out.print("Go, ");
        System.out.println("go, go!");
    }
}

The ln in println is short for line, so it means print a line.