What is polymorphism?

The word poly which has been derived from Greek word represents dual or more than 1 implementation 

in the real world day to day life a ball is the best example of polymorphism  because every game has a ball but they are made of different materials size and look and feel are different however each ball used in the game in the same manner

 if one task is performed in different ways  it is known as polymorphism.

In oops polymorphism is divided into 2 categories that is method overloading and method overriding .

Method overloading further divided into 2 categories 

1.Operator overloading

 2.Method Overloading 

Operator Overloading is not supported in java and C# it is supported C++ only  it is supported whereas  Math operator + can be used more than one way

Comments

Blogs