+ 15

What Is Polymorphism???

C++

18th Oct 2017, 6:28 AM
Abhay Kumar Singh
Abhay Kumar Singh - avatar
8 Answers
+ 18
In object-oriented programming,polymorphism (from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form.
18th Oct 2017, 6:30 AM
Kartikey Sahu
Kartikey Sahu - avatar
+ 8
It's the ability of an object to take many forms. mainly used when a super class reference is used to refer sub class object. In general we have run time polymorphism & compile time polymorphism. Ex: 1.Run time polymorphism class A { public void show (){ System.out.println("In class A"); } class B extends A { public void show (){ System.out.println("In class B"); } class main { public static void main(string [] args){ B obj=new B(); obj.show (); } } output :In class B 2.compile time polymorphism class A { public void show (){ System.out.println("default"); } public void show(int i){ System.out.println ("parameterized "); } } class main { public static void main (string args []){ A obj=new A(); obj.show (); } } output :default
19th Oct 2017, 4:08 PM
Thriveni
Thriveni - avatar
+ 6
Thanks To All For Helping Me..👍👍👍
18th Oct 2017, 10:50 AM
Abhay Kumar Singh
Abhay Kumar Singh - avatar
18th Oct 2017, 6:57 AM
Oma Falk
Oma Falk - avatar
+ 4
It's simply the ability of a variable, function or object to take on multiple forms.For example,in a programming language that exhibits polymorphism,object of classes belonging to the same hierarchical​ tree may process functions bearing the same name,but each having different behaviors.
18th Oct 2017, 10:43 AM
Mejri Badr
Mejri Badr - avatar
+ 2
it is the feature of c++ ...object oriented programming ...polymorphism it means in Greek word ( having multiple forms ) it is done by two forms 1 function overloading ..2 . operator overloading
20th Oct 2017, 8:17 AM
sonam
sonam - avatar
+ 2
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.
23rd Jun 2018, 8:38 PM
Pravin Yadav
Pravin Yadav - avatar