What is polymorphism ? Explain with examples
Answer Posted / khushpreet kaur.
Polymorphism is taken from the greek word which means "many
forms"...
So polymorphism means "to carry out operations of
different processing steps by function having same
messages".
when a base class member function can be overridden by
defining a derived class member function with same name as
that of the base class member function,then such type of
concept is called "Polymorphism".(one interface multiple
methods)
polymorphism is of two types- compile time(early or static
binding) and run time(dynamic or late binding)..
in comlite time is of two types-function overloading and
operator overloading.
in run time is of two types-virtual function and pure
virtual function..
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Why is abstraction needed?
Plese get me a perfect C++ program for railway/airway reservation with all details.
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is difference between polymorphism and inheritance?
Can an interface inherit a class?
Can main method override?
What are the 3 principles of oop?
#include
What is destructor example?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
Is data hiding and abstraction same?
What is meant by multiple inheritance?
What is encapsulation with example?
What is the main feature of oop?
What is encapsulation with real life example?