What are the difference between a class and an object in Java?
Sandhya Answered question September 7, 2023
A Class is like an object constructor, or a “blueprint” for creating objects.
Sandhya Answered question September 7, 2023
- Object is an instance of a class.
- Class is a blueprint or template from which objects are created.
- Object is a real world entity such as pen, laptop, mobile, bed, keyboard, mouse, chair etc.
- Class is a group of similar objects.
Shathana. S.R. Answered question September 7, 2023