+ 5
What is polymorphism?
5 Answers
+ 7
It is the ability of the same code to behave in different ways based on its inputs.
Types of Polymorphism
1)Compile time
2)Run time
+ 5
It's a feature of the plus sign which enables it - when used as an operator - to *add* two integers or floats, but to *concatenate* strings or *join* sets.
It behaves differently according to the data type it is used with - this trait is called polymorphism.
+ 1
To cut a long story short,it's the second paradigm of OOP :)
+ 1
Polymorphism is a OOPs concept where one name can have many forms.
For example, you have a smartphone for communication. The communication mode you choose could be anything. It can be a call, a text message, a picture message, mail, etc. So, the goal is common that is communication, but their approach is different. This is called Polymorphism.