Class: Class is a blueprint from which objects are created.
Object: Object can be related to a real-world object. An object in Java is an instance of a class.
Object have states (properties/attributes) and behaviors (methods).
Instance variable – One copy per object.
Class variable – One copy per class.
There is a slight difference between Object and Instance:
- Objects are things which resides in memory.
- Instances are things that reference to them.