what is polymorphism with example?types of polymorphism?
Answer Posted / sandeep
It is reacting differently for the same kind of message.
For example,
Consider Parrot,Penguin & tiger
My message is "approach me quickly"
Their different reactions:
Parrot approaches me by " flying"
Penguin approaches me by "swimming"
Tiger approaches me by "running"
Here my message is simply "pproach me quickly"
But different things have been reacted differently.
This is called Polymorphism.
As far as my knowledge is concerned there is only one type
of polymorphism and that is runtime polymorphism.
| Is This Answer Correct ? | 69 Yes | 88 No |
Post New Answer View All Answers
What is the Concept of Encapsulation in OOPS
What do you understand by the term string pool?
What is meant by class?
Is map ordered in java?
Can we convert integer to string in java?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
Why does my function print none?
What are filterstreams?
Write a program to reverse array in place?
How do you allocate memory to object?
Can we override private constructor in java?
How an object is serialized in java?
Variables used in a switch statement can be used with which datatypes?
Is there any sort function in java?
What does the @override annotation do?