What is Polymorphism?
Polymorphism is one of the core concepts of object-oriented programming languages where poly means many and morphism means transforming one form into another. Polymorphism means the same function with different signatures is called many times. In real life, for example, a boy at the same time may be a student, a class monitor, etc. So a boy can perform different operations at the same time. This is called polymorphism.
Features of Polymorphism:
- Programmers can use the same method name repeatedly.
- Polymorphism has the effect of reducing the number of functionalities that can be paired together.
First Method 70 Last Method
Example: In this example, we will implement Polymorphism with functions and objects.
20000 Class B
Please Login to comment...