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


Please Help Members By Posting Answers For Below Questions

what is the drawback of classical methods in oops?

2908


What is interface in oop?

656


Why is destructor used?

576


Can you inherit a private class?

629


What is the highest level of cohesion?

568






What is encapsulation oop?

570


2. Give the different notations for the class.\

1582


Is data hiding and abstraction same?

563


when to use 'mutable' keyword and when to use 'const cast' in c++

1642


What are different oops concepts?

568


What does and I oop mean?

610


Explain the advantages of inheritance.

666


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1646


Why is encapsulation used?

571


what is graphics

2004