Advertisements
Advertisements
प्रश्न
Define a class with an example.
व्याख्या
उत्तर
It is a blueprint or prototype of an object. It is known as the 'Object factory' because it produces the objects of similar type.
Example: If we create a class called "Fruits," it represents a category and can have characteristics and methods that apply to all varieties of fruits.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.02: Elementary Concept of Objects and Classes - EXERCISES [पृष्ठ १६]