×

java · level 1 · unit 1 · lesson 2

  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

shows a message on the screen.

System.out.println is a command that shows something on the screen. Read it as: system, out, print a line. Whatever you put inside its brackets is what appears.

Words go inside double quote marks, like "Hello, world!". A piece of text in quotes is called a . Picture the letters threaded on a string, like beads. The quotes are not shown.

Every instruction ends with a , ;. It works like the full stop at the end of a sentence, telling Java that this instruction is finished.

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}

Use a capital S in System, small letters in out.println, and double quotes at both ends.