Java Primitive Data Types Cheatsheet




Integer

Data TypeSize (bits)Range
byte8-128 to 127
char160 to 2^16-1
short16-2^15 to 2^15-1
int32-2^31to 2^31-1
long64-2^63 to 2^63-1

Floating Point

Data TypeSize (bits)Range
float32
double64

Other

  • boolean


┬ęCopyright 2019 OneCompiler | Privacy Policy | Terms & Conditions