same method name, different callers.
polymorphism means "same method name, different callers".
dog.speak() // caller: dog cat.speak() // caller: cat
function overloading vs. polymorphism
function overloading:same function name, different parameter(s).
polymorphism:same method name, different callers.
don't confuse with function overloading(same function name, different parameters).
Last updated 3 years ago