What is polymorphis…
 
Notifications
Clear all

What is polymorphism?

3 Posts
4 Users
3 Likes
271 Views
0
Topic starter

What is polymorphism?

3 Answers
2

he word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. 

Polymorphism is considered one of the important features of Object-Oriented Programming. Polymorphism allows us to perform a single action in different ways. In other words, polymorphism allows you to define one interface and have multiple implementations. The word “poly” means many and “morphs” means forms, So it means many forms.

1

Polymorphism is a feature of object-oriented programming languages that allows a specific routine to use variables of different types at different times. It is the ability of a programming language to present the same interface for several different underlying data types and different objects to respond in a unique way to the same message.

0

In Java polymorphism is mainly divided into two types: 

  • Compile-time Polymorphism
  • Runtime Polymorphism

 

Share: