Polymorphism is a concept in which a class contain more than one method with the same name, but behavior of each method is different is called polymorphism.

one method with the same name but behavior of each method is different is called polymorphism.

There are two types of polymorphism.

  1. Compile-time polymorphism or  method overloading  or static polymorphism or early binding
  2. Run-time polymorphism  or method overriding or Dynamic polymorphism or late binding or dynamic binding
OVERLOADINGOVERRIDING
It is performed at compile time.It is performed at runtime.
It is carried out within a class.It is carried out with two classes.
Parameters do not remain the same in case of overloading.The parameter must remain the same in case of overriding.
You can perform overloading on static methods.You cannot perform overriding on static methods.
Overloaded methods use static binding.Overridden methods use dynamic binding.