Coding & Programming > Programming Forum

What is polymorphism?

<< < (2/2)

greatshivam:
The 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.
Real life example of polymorphism, a person at the same time can have different characteristic. Like a man at the same time is a father, a husband, an employee. So the same person posses different behavior in different situations. This is called polymorphism.
Polymorphism is considered as one of the important features of Object Oriented Programming.

In C++ polymorphism is mainly divided into two types:

1:Compile time Polymorphism
2:Runtime Polymorphism

Lishmalinyjames:
Polymorphism is one of the core concepts in OOP languages. It describes the concept that different classes can be used with the same interface. Each of these classes can provide its own implementation of the interface. Java supports two kinds of polymorphism. You can overload a method with different sets of parameters.

nisargshah:
Polymorphism comprises of two words : Poly means "many" and morph means "forms". It means we can use multiple method names with the same class. There are two types of polymorphism : Static polymorphism and Dynamic Polymorphism.

Hope this answer helps!

https://www.yatharthmarketing.com/top-corporates-sales-consulting-programs-services-company-india-dubai-usa.html [nofollow]

saravanan28:
The word polymorphism means having many forms. ... Real life example of polymorphism: A person at the same time can have different characteristic. Like a man at the same time is a father, a husband, an employee. So the same person posses different behavior in different situations. This is called polymorphism.

Lishmalinyjames:
Polymorphism is one of the core concepts in OOP languages. It describes the concept that different classes can be used with the same interface. Each of these classes can provide its own implementation of the interface. That is called dynamic polymorphism.

Navigation

[0] Message Index

[*] Previous page

Go to full version