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 ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I learn java in 3 months?

746


What is ellipsis in java?

798


What's the difference between comparison done by equals method and == operator?

729


Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?

760


Why java is platform independent? Explain.

773


What is abstraction in java?

817


What is the difference between replace and replace all?

680


Can you sort a list in java?

722


What are green threads in java?

730


What is autoboxing in java?

798


What is preparedstatement in java?

774


How will you call an Applet using Java Script Function?

740


What are the parts of a method?

735


Why char array is favored over string for the storage of passwords?

757


If you do not want your class to be inherited by any other class. What would you do?

771