Skip to content
Sharp

Object-oriented programming · interview question

Why might a developer use the super keyword in overridden methods?

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

Correct answer

A. To call a method in the superclass.

Why

The super keyword is used within a subclass to call a method defined in its superclass. This is helpful for reusing functionality from the superclass method while also extending or modifying it in the subclass.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →