1.

List out some of the differences between a class and an object?

Answer»
CLASSOBJECT
It is a blueprint from which different instances (objects) are created.Objects are the instances of the class.
Class is a LOGICAL entity.Objects are physical entities.
Users can DECLARE class only once.Objects can be declared MULTIPLE times depending upon the requirements.
When a class is created there is no memory allocationObjects allocated memory.
Class is a group of objects.Objects are real-world entities such as PEN, copy, mouse, etc.
Class can be declared using class keyword e.g class STUDENT {}Objects can be declared using the new keyword e.g. Student s1=new Student();


Discussion

No Comment Found