Animation
Variables recap
Lets recap the most important issues regarding variables.
Create variable and assign new values
Variable types
- int : whole number, for example 0, -10, 255 or 2018584.
- char : character, for example ‘a’, ‘b’ or ‘t’.
- float : decimal number, for example 23.1, 1.0 or -4.2.
- color : color value, for example color(0, 22, 250) or #FFCC00.
- boolean : true or false
- String : text, for example “Hi!” or “Game over”.
Variable visibility
What’s the difference between this program…
…and this?