‹ Back to the paper
Which of the following statements are valid for static member methods of a class? I. They can…
Which of the following statements are valid for static member methods of a class?
I. They can access static as well as non-static data members.
II. They can call non-static member methods.
III. They cannot refer to this or super.
- aI and II
- bII and III
- cI and III
- dOnly III
Answer
Answer
AICorrect option: d
Answer: (d) Only III.
A static method can access only static data members directly, not non-static (instance) ones, so I is false; it also cannot call non-static instance methods without an object reference, so II is false. It genuinely cannot use this or super, since those refer to a specific object, so III is true.
From ISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024), question 11.