Skip to content
Sharp

Object-oriented programming · interview question

Which Java keyword would you use to explicitly invoke a superclass's method when it has been overridden in a subclass?

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

Correct answer

D. Super

Why

The super keyword is used to explicitly invoke a superclass's method from within a subclass when a method has been overridden. This allows access to the superclass implementation.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →