Java Primitive data Types and its Ranges:
Data Type | Size/Width | Range | Group |
Byte | 8-bits | -128 to 127 (-28 to 28-1) | Integer Group |
Short | 16-bits | -32768 to 32767 (-216 to 216-1) | |
Int | 32-bits | –2,147,483,648 to 2,147,483,647 (-232 to 232-1) | |
Long | 64-bits | –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (-264 to 264-1) | |
Float | 32-bits | 1.4e–045 to 3.4e+038 | Floating point |
Double | 64-bits | 4.9e–324 to 1.8e+308 | |
Char | 16-bits | 216 \u0000 to \uFFFF | Character |
Boolean | 1-bit | 20 True or false | Boolean |