Duplicate
type
size(bits)
Minimum
Maximum
Example
short
Open
16
-2^15
2^15-1
short s = 30_000;
int
Open
32
-2^31
2^31-1
int i = 100000000;
long
Open
64
-2^63
2^63-1
lont l = 100000000000000;
float
Open
32
-2^-149
(2-2^-23) * 2^127
float f = 1.456f;
double
Open
64
-2^-1074
(2-2^-52) * 2^1023
double d = 1.456789012345678;
char
Open
16
0
2^16-1
char c = ‘c’;
boolean
Open
1
-
-
boolean b = true;
TOP