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
Define jit compiler?
When does an object becomes eligible for garbage collection in java?
Explain creating threads by extending thread class ?
Is zero a natural number?
Can we declare an interface as final?
Explain the hierarchy of java exception classes?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
What is port number in java?
How do I get 64 bit java?
What is your platform’s default character encoding?
Is there a way to increase the size of an array after its declaration?
How do you achieve polymorphism in java?
What are the files generated after using IDL to java compiler?
What is an iterator java?
What are abstract methods in java?