An object’s class defines how the object is implemented. The class defines object’s internal state and the implementation of its operations. In contrast, an object’s type only refers to its interface – a set of requests to which it can respond.
An object’s class defines how the object is implemented. The class defines object’s internal state and the implementation of its operations. In contrast, an object’s type only refers to its interface – a set of requests to which it can respond.