Q.1 – what is a class in java?
Ans – class is a collection of objects.
- It does not take any space in memory.
- class is also called a blueprint.
- the class helps us to create objects.
- class is a collection of Variables and methods.
Q.2 – what is an Object in java?
Ans. – Object is an Instance of class.
Important points –
- It takes up space in memory.
- the object is a member of class.