Skip to content
Sharp

Object-oriented programming · interview question

Why might excessive use of polymorphism affect performance in a Java application?

Multiple choiceHardchapter-5-curatedpremiumooppolymorphism
Choose one answer
Answer and explanation

Correct answer

B. Because dynamic method dispatch requires additional computation at runtime

Why

Excessive use of polymorphism can affect performance because dynamic method dispatch requires additional computation at runtime to determine which method to execute. This is a trade-off for the flexibility and maintainability that polymorphism offers.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →