Solution of discussion forum-1

Solution of discussion forum-1

by Hosneara sultana Akhi -
Number of replies: 0

The differences between Class and Object are:

1.Class is a blueprint or template from which objects are created.Object is an instance of a class.

2. Class is a logical entity. Object is a physical entity.

3. Class is declared once. Object is created many times as per requirement.

4. Class doesn't allocated memory when it is created. Object allocates memory when it is created.

5. Classes can’t be manipulated as they are not available in memory but object can be manipulated.


For example :

Class - Car

Object - Toyota, Nissan