Camael's note
/
Java Primitive type 에 대해 알아보자 (용어정리)
Search
Share
Search
type
size(bits)
Minimum
Maximum
Example
byte
Open
8
-2^7
2^7-1
byte b = 100;
short
Open
16
-2^15
2^15-1
short s = 30_000;
int
Open
32
-2^31
2^31-1
int i = 100
000
000;
long
Open
64
-2^63
2^63-1
lont l = 100
000
000
000
000;
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;