Java: Primitive Data Types

 

Primitive Type Size Range of Values (inclusive)
byte 8 bits –128 to 127
short 16 bits –32768 to 32767
int 32 bits –2147483648 to 2147483647
long 64 bits –9223372036854775808 to 9223372036854775807
float 32 bits 2–149 to (2 – 2–23) · 2127
double 64 bits 2–1074 to (2 – 2–52) · 21023
char 16 bits ‘\u0000’ to ‘\uffff’ (0 to 65535)
boolean unspecified true or false

 

Leave a Reply