What is an object?
Any real world entity which has some states and behaviors is an Object.
Any class is also known as an object.
Class is used to create object.
Here states means data, and behaviors means functions.
eg : pen is an object, because it contains data like inkLevel, cap state - open or closed. It also contains functions like openCap() and write() functions.
Back To Top