Definition of object:-
An object is a concept, abstraction or thing that has meaning for an application. Object is
basic run time entity.
Definition of class:-
A Class is a group of objects with similar properties (attributes), common behavior
(operation), common relationship to other objects and common semantics.
Difference:-
- Class specifies properties, behavior, relationships and semantics that all the
objects of that class share where as object stores values for individual.
- Class is a group of objects whereas object is an individual entity with unique
identity.
Example of class:-
STUDENT is a class. It specifies members as rollno.
Example of object:-
For class student: S1, S2, S3,….,Sn are objects.