Java has exactly 8 primitive data types:
| Type | Size | Range / Use |
|------|------|-------------|
| byte | 8-bit | -128 to 127 |
| short | 16-bit | -32,768 to 32,767 |
| int | 32-bit | -2 billion to 2 billion |
| long | 64-bit | Huge integers |
| float | 32-bit | Decimal (less precise) |
| double | 64-bit | Decimal (precise — use this) |
| char | 16-bit | Single character |
| boolean | 1-bit | true / false |
Run this — all eight in one program.