class and object

Comparison chart

Class versus Object comparison chart

Definition: Class is mechanism of binding data members and associated methods in a single unit. Object is instance of class or variable of class.

Existence: Class is logical existence. Object is physical existence.

Memory Allocation: Memory space is not allocated for class, when it is created. Memory space is allocated for object, when it is created.

Declaration/definition: Definition is created once for class. it is created many time as you require for objects.

results matching ""

    No results matching ""