English

A ______ variable is a common field for all the objects of a class. - Computer Applications

Advertisements
Advertisements

Question

A ______ variable is a common field for all the objects of a class. 

Options

  • Local variable

  • Global variable

  • Class variable

  • Instance variable

MCQ
Fill in the Blanks

Solution

Class variable

Explanation:

A class variable, or static variable, is a shared attribute among all instances of a class. It is associated with the class rather than with any individual object. Every instance of that class has a common copy of the variable.

shaalaa.com
  Is there an error in this question or solution?
Chapter 8: Encapsulation and Inheritance - EXERCISES [Page 444]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 8 Encapsulation and Inheritance
EXERCISES | Q I. 3. | Page 444
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×