T E C h O C E A N H U B

Let’s Learn Polymorphism in Java

Polymorphism is  very common word for everyone.  If we break polymorphism , the defination is quite clear, It is made up of two words, poly+morphism, which means many forms. Below there is a simple diagram which clearly explains types of polymorphism.

Static polymorphism

Dynamic polymorphism

Static polymorphism can be achieved by method Overloading which can be explained as same method name but using different parameters to achieve different results .

Whereas Dynamic polymorphism has its own explaination with overriding which, can be explained as parent and child having a same method name but implementation can be different or same.

I am also adding a video to explain more about Polymorphism, Have a look.

Please feel free to comment and subscribe my channel.

Copyright ©TechOceanhub All Rights Reserved.