What are Objects In Java
First things that comes in mind are
  • They are real things
  • They occupy some space in memory
  • They have a state and some characteristics
Java Objects are the real world entities that can have a state and some behavior. They are created from a blueprint i.e. classes.

If we say that Person is a class, then person is a blue print of every human in this world and we are all the objects of this class Person.

Since each object has some state and some characteristics, thus we may be similar or different from each other ion the basis of these states or characteristics. The image below shows a Class - "Person" and its objects Elaya, Dara and Bharat.

No comments :

Post a Comment