Data type is defined as the size and type of values that can be stored in an identifier/variable.
There are two type of data types in java :-
- Primitive data types: The primitive data types include boolean, char, byte, short, int, long, float and double.
- Non-primitive data types: The non-primitive data types include Classes, Interfaces, and Arrays.