हिंदी

Which of the following is a valid statement? (a) A class can have many objects (b) A class can have only one object (c) A class cannot have any object (d) A class can have only two objects

Advertisements
Advertisements

प्रश्न

Which of the following is a valid statement?

विकल्प

  • A class can have many objects

  • A class can have only one object

  • A class cannot have any object

  • A class can have only two objects

MCQ
Advertisements

उत्तर

A class can have many objects

Explanation:

A class is simply a reusable blueprint or template. Once you write a class, you can use the new keyword to create an unlimited number of unique objects from it. Each object acts as an independent instance with its own separate data values while sharing the same structure.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: Library Classes - Exercises [पृष्ठ १३३]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 5 Library Classes
Exercises | Q 1. (vi) | पृष्ठ १३३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×