Primitive data type

In this topic, you will learn about Primitive data type.

Primitive data type:

It must be declared static memory .In java primitive data types are divided into two parts. they are Boolean and numeric data types.

Numeric data types are of character and number types. some number data types are integer, float, byte, double, long, and short.

Primitive data types and their size:

Boolean 1 byte
Byte 1 byte
Short 2 bytes
Int 4 bytes
Long 8 bytes
Float 4 bytes
Double 8 bytes
Char 2 bytes

Comment below if you have queries related to the above article.

See also  Java Program Sort Elements in Dictionary Order