Java uses dynamic method dispatch to determine at runtime which method implementation to execute.
Dynamic method dispatch is a mechanism by which a call to an overridden method is resolved at runtime rather than compile-time. This allows Java to choose the appropriate method implementation based on the actual object type. In a polymorphic codebase, when you call a method on a superclass reference, the JVM uses the actual object's method. For example, if `Order` class has a `process()` method overridden by `OnlineOrder`, and you call `order.process()`, the `OnlineOrder`'s `process()` is executed.