Type
|
Description
|
Size
|
int
|
The integer type, with range
-2,147,483,648 . . . 2,147,483,647 |
4 bytes
|
byte
|
The type describing a single
byte, with range -128 . . . 127
|
1 byte
|
short
|
The short integer type, with
range -32768 . . . 32767
|
2 bytes
|
long
|
The long integer type, with
range -9,223,372,036,854,775,808 . . . -9,223,372,036,854,775,807 |
8 bytes
|
double
|
The double-precision
floating-point type, with a range of about ±10308 and
about 15 significant decimal digits
|
8 bytes
|
float
|
The single-precision
floating-point type, with a range of about ±1038 and
about 7 significant decimal digits |
4 bytes
|
char
|
The character type, representing
code units in the Unicode encoding scheme
|
2 bytes
|
boolean
|
The type with the two truth
values false and true
|
1 bit
|