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
What is the difference between state-based unit testing and interaction-based unit testing?
What is the need of transient variables in Java ?
Is alive in java?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
Which method returns the length of a string?
What is array pointers ?
What is passed by reference and pass by value ?
What differences exist between iterator and listiterator?
What is compareto () in java?
What are the parts of a method?
What is the epoch date?
What is variable in java?
How do you take thread dump in java?
What's the difference between an abstract class and interface in java?
What is a boolean flag in java?