What is polymorphism ? Explain with examples
Answer Posted / k.r.sukumar
Polymorphism means "A single function which is used for
different purposes depending upon the parameters passed"
for eg;
Area is the function name which is used for
calculating areas of the rectangle, triangle and even more.
from this persepective we conclude that area is the single
function which is used for calculating different ones.
area(a);---> Area of the square
area(l,b);---> Area of the rectangle.
| Is This Answer Correct ? | 22 Yes | 1 No |
Post New Answer View All Answers
What is protected in oop?
What is encapsulation in simple terms?
Is oop better than procedural?
What type of loop is a for loop?
What are the 5 oop principles?
How do you define a class in oop?
What is polymorphism and why is it important?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
Why is there no multiple inheritance?
any one please tell me the purpose of operator overloading
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
What is interface in oop?
can we make game by using c
Why do we need polymorphism in c#?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?