Polymorphism

Learn about polymorphism and its types.

Overview

The word polymorphism consists of two root words. Poly means many, and morph means shape or form. Polymorphism in object-oriented programming means that an object can take many forms.

Let’s suppose we have different classes of varying shapes, such as squares, rectangles, and so on. They all will have the same method, calcArea(). ...