Java defines eight primitive types of data: byte, short, int, long, char, float, double, and boolean.
Primitive Type Reserved Word Size Min Value Max Value
Boolean boolean N/A N/A N/A
Character char 16-bit Unicode 0 Unicode 216 - 1
Byte integer byte 8-bit -128 +127
Short integer short 16-bit -21 +215 - 1
Integer int 32-bit -231 +231 - 1
Long integer long 64-bit -263 +263 - 1
Floating-point float 32-bit 1.4e-045 3.4e+038
Double precision floating-point double 64-bit 4.9e-324 1.8e+308
byte, short, int, and long are for whole-valued signed numbers. float and double are fractional precision numbers.
char represents symbols in a character set, like letters and numbers. boolean represents true/false values.