what is polymorphism with example?types of polymorphism?

Answer Posted / vignesh,c

poly means many morph means shapes so, one function taking
many shapes ,for ex: take the function name as add,
by passing different sets of arguments it can add 2no.s,3
numbers etc....

there are two types of polymorphism namely,
runtime polymorphism,compile time polymorphism,
compile time Polymorphism means function overloading,
run time polymorphism means virtual functions.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What java ide should I use?

569


What is memory leak and how does java handle it?

523


What is the difference between char and char *?

567


What is meant by class?

543


How does indexof work?

506






How to sort array of 0 and 1 in java?

543


Can we change the value of static variable?

500


What are abstract methods in java?

655


What are advantages of using Java?s layout managers than windowing systems?

1861


What are thread groups?

576


What do the thread?class methods run() and start() do?

543


What is an immutable object?

587


What is the function of character?

524


In a container there are 5 components. I want to display all the component names, how will you do that?

1559


How does thread synchronization occurs inside a monitor?

557