Java is an Object-Oriented Programming (OOP) language.
OOP makes thinking about programming closer to thinking about the real world.
In OOP, each object is an independent unit with a unique identity.
An apple is an object and a chair is another object.
Each object has its unique identity.
Objects can have characteristics, which are used to describe them.
For example, an apple can be red or blue.
These characteristics are also called attributes. An attribute describes the current state of an object.
In the real world, each object behaves in its own way.
The car moves, the phone rings, and so on.
The same applies to objects.
In object oriented programming, each object has three dimensions:
Attributes describe the current state for an object,
Behavior shows what the object can do.
A class is the definition of the objects.
You can use the same class as a blueprint for creating multiple objects.
Before creating objects we need to have the blueprint which is the class.
Each class has a name, and each may define attributes and behavior.