Advertisements
Advertisements
प्रश्न
Define an object with an example.
व्याख्या
उत्तर
It is a unique entity having some characteristics and behaviours. It is known as the 'Instance of a Class'.
Example: If we consider the class "Fruits," then different varieties of fruits such as banana, apple, and pear are objects in the category "Fruits." Each fruit belongs to the class "Fruits," which has comparable behaviours and characteristics.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.02: Elementary Concept of Objects and Classes - EXERCISES [पृष्ठ १६]