Skip to content

Boxes with names on them

Store a number once, use it everywhere.

W1

A box with a name on it

A variable is a box with a name written on the side. You put a value in, and after that you use the name instead of the value.

Every box has a type: what it is allowed to hold. Java wants the type before you put anything in, so it can stop you putting the wrong thing there.

Card 1 of 6

1 / 6
Boxes with names on them · Robot On-Ramp