Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article
In object-oriented programming (OOP), objects are The basal entities that really exists in The memory. Each entity is based connected a blueprint of attributes and behaviours (variables and functions) defined arsenic Class.
The basal intent of a Class is to place The communal attributes and behaviours and group them arsenic an entity that Can beryllium reused again and again for akin purposes. The Objects are specified entities that are created based connected these classes to travel that purpose. All information members and personnel functions of The people Can beryllium accessed pinch The thief of objects. When a people is defined, nary representation is allocated, but representation is allocated erstwhile it is instantiated (i.e. an entity is created).
Example of Object
For Example, the objects for The class Account are SBI Account, ICICI account, etc.
Characteristics of an object
As discussed above, each entity has immoderate attributes and behaviours, but it is very important to understand what are The characteristics, that each entity must have:
- Identity: Every entity must person a different personality from The other, known arsenic The object’s name. No 2 entity must person The aforesaid name.
- State: If location are immoderate properties of a class, that is designed to beryllium derived in an object, it must person immoderate values to get initiated (usually done pinch The thief of constructors).
- Behaviour: Now since The entity person a sanction and immoderate properties, it must person immoderate intent arsenic well. So these purposes are defined pinch thief of functions (processes) and are known arsenic behaviours.
Last Updated : 31 Jul, 2023
Like Article
Save Article