Primitive data types in Java

Primitive Description Range byte Byte-length integer (8 bits) -128 (-27) to 127 (27-1) short Short integer (16 bits) -32,768 (-215) to 32,767 (-215-1) int Integer (32 bits) -2,147,483,648 (-231) to 2,147,483,647 (-231-1) long Long integer (64 bits) -9,223,372,036,854,775,808 (-263) to 9,223,372,036,854,775,807 (263-1) float Single-precision floating point (32-bit IEEE 7541) Smallest positive nonzero: 14e-45 Largest positive […]
Continue reading…

Enjoyed this post? Share it!

 
 

Primitive data types in java

There are eight primitive types of data in java: byte, short, int, long, char, float, double, and boolean. They are broadly classified as: Integers – byte, short, int, and long Floating-point – float and double. Characters Boolean Byte The smallest integer type in java and has a range from -128 to 127. Byte is used […]
Continue reading…

Enjoyed this post? Share it!