In object-oriented programming we create software objects that model real world objects.
Software objects are modeled after real-world objects in that they too have state and behavior. A software object maintains its state in one or more variables. A variable is an item of data named by an identifier. A software object implements its
behavior with methods. A method is a function associated with an object.
Definition: An object is a software bundle of variables and related methods.
An object is also known as an instance. An instance refers to a particular object.
For e.g. Karuna’s bicycle is an instance of a bicycle—It refers to a particular bicycle.
Sandile Zuma is an instance of a Student.
The variables of an object are formally known as instance variables because they contain the state for a particular object or instance. In a running program, there may be many instances of an object. For e.g. there may be many Student objects. Each of these objects will have their own instance variables and each object may have different values stored in their instance variables. For e.g. each Student object will have a different number stored in its StudentNumber variable.