A variable is a placeholder for a value. Variables Variables are used for storing values. In Java, variables need to be defined with a data-type, to define its storage space requirements. The name of the variable must start with a letter, but it may contain numbers within the name. In processing, variable names are case-sensitive.
...
Each kind of variable (it's data type) has an allocated amount of memory, which is enough to store a particular range of values.
Type | Bytes | Value range |
---|---|---|
byte | 1 byte | -128 to 127 |
short | 2 byte | -32,768 to 32,767 |
int | 4 byte | -2^31 to 2^31-1 |
long | 8 byte | -2^63 to 2^63-1 |
float | 4 byte | -3.4e38 to 3.4e38 |
double | 8 byte | -1.7e308 to 1.7e308 |
boolean | 1 bit | true or false |
char | 2 byte | '\u0000' to '\uffff' |
Operators
An operator is a symbol that tells the computer to perform a particular math or logic operation. Some of the most common operators are:
...