Class:
- Class is a structure.
- Binding the data with its related and corresponding functions.
- Class is the base for encapsulation.
- Class is a user defined data type in java.
- Class will act as the base for encapsulation and implement the concept of encapsulation through objects.
- Any java applications looks like collection of classes but where as c- application looks like collection of functions
Object:
- Object is nothing but instance (dynamic memory allocation) of a class.
- The dynamic memory allocated at run time for the members [non-static variables] of the class is known as object.
No comments