What is polymorphism?

Author Topic: What is polymorphism?  (Read 5765 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
What is polymorphism?
« on: 01-05-2017, 03:27:29 »
Poly stands for “many” and morph stands for “form”.   It simply means the ability of an object to take more then one form.


Offline SeoDezin

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 14
  • Posts: 259
  • Karma: 1
  • Gender: Male
    • http://cognitive46.wordpress.com/
Re: What is polymorphism?
« Reply #1 on: 02-20-2018, 08:07:24 »
Polymorphism is an object- oriented programming concept that refers to the ability of a variable , function or object to take on multiple forms .A language that features polymorphism allows developers to program in the general rather than program in the specific.

Offline Lauraponting

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 2
  • Karma: 0
Re: What is polymorphism?
« Reply #2 on: 04-17-2018, 22:17:44 »
Polymorphism in Java:
Polymorphism in java is a mechanism  which we can perform a single action by different ways.
 "poly" means many and "morphs" means forms.
There are two types of polymorphism in java: compile time polymorphism and runtime polymorphism.
We can perform polymorphism in java by method overloading and method overriding.
If you overload static method in java, it is the example of compile time polymorphism.
Runtime polymorphism or Dynamic Method Dispatch is a process in which a call to an overridden method is resolved at runtime rather than compile-time.

Offline richardmsmith

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 3
  • Posts: 221
  • Karma: 0
  • Gender: Male
    • Trucking App Solution
Re: What is polymorphism?
« Reply #3 on: 07-17-2018, 02:50:44 »
polymorphism in Java:
The word "poly" means many and "morphs" means forms. So polymorphism means many forms.
There are two types of polymorphism in Java: compile-time polymorphism and runtime polymorphism. We can perform polymorphism in java by method overloading and method overriding.

Offline EugeneHill

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 1
  • Posts: 22
  • Karma: 0
  • Gender: Male
    • TechTIQ Solutions | App Development Agency in London
Re: What is polymorphism?
« Reply #4 on: 04-17-2019, 00:35:54 »
Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.
For instance, suppose there is a class called Animal, and a class called Dog that inherits from Animal.

Polymorphism is the ability to treat any Dog object as an Animal object like so:
Dog* dog = new Dog;
Animal* animal = dog;


Offline greatshivam

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 5
  • Karma: 0
Re: What is polymorphism?
« Reply #5 on: 02-24-2020, 05:40:07 »
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

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
999 Views
Last post 02-13-2016, 00:40:01
by chinmay.sahoo