Skip to content
Sharp

Object-oriented programming · interview question

How does Java decide which overridden method to call at runtime?

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

Correct answer

B. Based on the object type.

Why

Java uses dynamic binding at runtime to decide which overridden method to call, based on the actual object type rather than the reference type.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →