‹ Back to the paper
Question 12
1 mark
Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)MCQObjects
Choose the correct option.
Which one of the following keywords will make the data member as a class variable?
- (a)static
- (b)final
- (c)abstract
- (d)public
Answer
Answer
Correct option: a
Answer: (a) static.
Declaring a data member static makes it a class variable: a single copy shared by all objects of the class, rather than a separate copy per object.