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
How does polymorphism work?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
Can we create object of abstract class?
What is new keyword in oops?
What is encapsulation selenium?
Which language is pure oop?
What is difference between oop and pop?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is object-oriented programming? Webopedia definition
How many human genes are polymorphic?
how to get the oracle certification? send me the answer
What is encapsulation in oops?
What makes a language oop?
What is protected in oop?
How do you achieve runtime polymorphism?