by BehindJava

What is Polymorphism in Java

Home » java » What is Polymorphism in Java

In this tutorial, we are going to learn what is polymorphism in Java in detail.

Polymorphism in Java is a concept by which we can perform a single action in different ways.

Polymorphism is derived from 2 Greek words: poly and morphs. The word “poly” means many and “morphs” means forms. So polymorphism means many forms.

In Java, We have two types of polymorphism i.e. runtime polymorphism and compile time polymorphism.

Runtime polymorphism can be achieved by method overriding, and it also called as dynamic method dispatch while compile time polymorphism can be achieved by method overloading.

The important topics that must be covered while preparing for a java interview with respect to polymorphism are mentioned below.