Polymorphism means having one name and many forms or shape. The term polymorphism comes from Greek roots. In Greek “poly” means many and “morphe” means form.

Polymorphism definition
Polymorphism is the ability to take more than one form.

There are two types of polymorphism:

  1. Compile time(Static) polymorphism
  2. Run time(Dynamic) polymorphism

Compile time polymorphism is achieved through function overloading, operator overloading and constructor overloading. Run time polymorphism is achieved through virtual functions and function overriding.

Polymorphism is considered as an essential feature of any object-oriented programming language.