×

java · level 1 · unit 1 · lesson 1

  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

is a list of instructions for a computer.

Code is instructions written down for a computer. A set of instructions that does one job, like a recipe for breakfast, is called a . When you a program, the computer starts following it.

The computer follows every line exactly, from the top down. It never guesses what you meant. We will write our code in Java, a language that people and computers can both read.

In Java, your instructions always sit inside a : the lines with public class Main and main. Think of it as the box your instructions go in. Curly brackets, { and }, open and close each part.

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

Press run and the computer says Hello! back to you, because the middle line is your instruction.