Next - Previous     
    Overview        Class Hierarchy        Types of Polymorphism        Resources

What is polymorphism?

Generally speaking, it is the ability to appear in many forms.

In object-oriented programming, polymorphism refers to a programming language's ability
to process objects differently depending on their data type or class.

More specifically, it is the ability to redefine methods for derived classes.

Click here to see the example of polymorphism:

Polymorphic functions and data types:

The concept of polymorphism applies to functions as well as types. A function that can evaluate
to and be applied to values of different types is known as a polymorphic function. A data type that contains elements of an unspecified type is known as a polymorphic data type
.