Styrow.dev
Question 37 of 247
Java Topic: General medium

What is runtime polymorphism or dynamic method dispatch?

Question

What is runtime polymorphism or dynamic method dispatch?

Answer

In Java, runtime polymorphism or dynamic method dispatch is a process in which a call to an overridden method is resolved at runtime rather than at compile-time. In this process, an overridden method is called through the reference variable of a superclass. The determination of the method to be called is based on the object being referred to by the reference variable.