Object
An object is any entity that has a state and behavior. For example, a car is an object. It has
States: idle, first gear, etc
Behaviors: braking, accelerating, etc.
State:
State tells us how the object looks or what properties it has. i.e. color, size, etc.
Behavior tells us what the object does. It tells it's functionality.
An Object is a particular Class instance that encapsulates data and behaviour. Objects are Java programs' fundamental building blocks and represent real-world entities, ideas, or concepts.
Class
A Class is a template or model or blueprint that defines a set of Variables and Methods in Java, and it can be used to create Objects.
A Class is a group of objects which have common properties. It is a user-defined data type with a template that serves to define its properties. To create a class, use the keyword class.