You are on page 1of 1

Primitive Data Types in Java

Type Declaration Size Range Default Value


byte 8 bits From (-27 ) to (27 – 1) 0
short 16 bits From (-215) to (215 – 1) 0
Integers
int 32 bits From (-231) to (231 – 1) 0
long 64 bits From (-263) to (263 – 1) 0
(Approx.) ±3.40 * 1038
float 32 bits 0.0f
(Max. 7 digits after decimal point)
Fractions
(Approx.) ±1.79 * 10308
double 64 bits 0.0d
(Max. 15 digits after decimal point)

\u0000'
Characters char 16 bits Any single character
(null character)

Boolean boolean 1 bit true or false FALSE

You might also like