Overloading is an example of polymorphism. Method overloading is an example of static polymorphism. polymorphism means many forms. An important example of polymorphism is how a parent class refers to a child class object.
We have two classes: A child class cat and a parent class Animal. The cat class extends Animal class. Both the classes have a common method void eat(). cat class is giving its own implementation to the eat() method or in other words it is overriding the eat() method.