Java Primitive Data Types


Integer

Data Type Size (bits) Range
byte 8 -128 to 127
char 16 0 to 2^16-1
short 16 -2^15 to 2^15-1
int 32 -2^31to 2^31-1
long 64 -2^63 to 2^63-1

Floating Point

Data Type Size (bits) Range
float 32
double 64

Other