Skip to content
Sharp

Object-oriented programming · interview question

In the context of method overriding, what role does the super keyword play?

Multiple choiceMediumchapter-5-curatedpremiumoopmethod-overriding
Choose one answer
Answer and explanation

Correct answer

B. It allows accessing the superclass method that is overridden.

Why

The super keyword is used to call the overridden method of the superclass from within the subclass. This can be useful when the subclass wants to extend or modify the behavior of the superclass method.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →