Polymorphism literally means something that has multiple behaviors.
In java, we can have static and temporary polymorphism.
Overloading is a static polymorphism, as it allows different behavior by passing different arguments. But this is only allowed at runtime, therefore it is static.
Overriding is dynamic polymorphism, since the actual function call depends on the type of object that calls it, which is available only at run time, therefore dynamic.
source share