English

Which of the following data is a separate field for all the objects of a class? - Computer Applications

Advertisements
Advertisements

Question

Which of the following data is a separate field for all the objects of a class? 

Options

  • Local variable

  • Class variable

  • Instance variable 

  • Primitive variable 

MCQ

Solution

Instance variable

Explanation:

An instance variable is a non-static variable specified within a class. Each class object (instance) receives its own distinct copy of the instance variable, and the values of instance variables can differ for each class object.

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. 4. | Page 444
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×