Types of | number of digits | range |
boolean | java virtual machine decision | true or false |
char | 16bits (2 bytes) | 0~65535 |
byte | 8bits (1 byte) | -128~127 |
short | 16bits (2 bytes) | -32768~32767 |
int | 32bits (4 bytes) | -2147482648~2147483647 |
long | 64bits (8 bytes) |
- very big~+ very big (the landlord can't remember) |
float |
32bits (4 bytes) |
Variable scale |
double | 64bits (8 bytes) | Variable scale |
Note: byte, short, int, and long are numeric values (with positive and negative signs). float and double are floating point types!