Primitive data types are data types built into the Java language.
They are the foundations of all other types and are classified into four categories:
-
Integer (
byte
,short
,int
&long
) -
Floating point (
flaot
&double
) -
Character (
char
) -
Boolean (
boolean
)
When we work with primitive types in Java, each variable’s values are unrelated to any other variable’s values. This is important because other, non-primitive data types’s storage are managed differently.