What is the purpose of primitive data types in java?

There are two types of variables in Java:

There are two types of variables in Java:

• Primitives - A primitive variable can be one of eight types: char, boolean, byte, short, int, long, double, or float. Once a primitive has been declared, its primitive type can never change, although in most cases its value can change.

• Reference variables - A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed.

Primitive data types are used to hold data that is used for general calculations and other similar purposes.

Primitive data types are: int, byte, float etc