‹ Back to the paper
Which one of the following keywords will make the data member as a class variable?
- astatic
- bfinal
- cabstract
- dpublic
Answer
Answer
AICorrect 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.
From ISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024), question 12.