It can be inferred from the discussion above that classes are user-defined data types implemented using primitive data types, e.g., boolean, int, char, etc. While primitive data types only focus on modeling the state of the object, user-defined data types can encapsulate the state and its behaviors into a unit.