what is polymorphism?

Answer Posted / navieen

Polymorphism means the ability of a single variable of a
given type to be used to reference objects of
different types, and automatically call the method that is
specific to the type of object the variable references.
The benefit of polymorphism is that it is very easy to add
new classes of derived objects without breaking the calling
code that uses the polymorphic classes or interfaces.
When you send a message to an object even though you
don’t know what specific type it is, and the right thing
happens, that’s called polymorphism. The process used by
object-oriented programming languages to implement
polymorphism is called dynamic binding.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which of the following is not an isolation level in the JDBC

1858


What is the abstract class?

748


Define how objects are stored in java?

760


Are arrays dynamic in java?

754


Explain the difference between abstract classes and interfaces in java?

803






Will the compiler creates a default constructor if I have a parameterized constructor in the class?

764


What is finalize()?

851


What is the exact difference in between Unicast and Multicast object?

1737


How many bits are in a sentence?

777


What is abstraction in java?

797


Is there any case when finally will not be executed?

700


What is the purpose of java?

731


What are functions in java?

681


What is a null class?

745


What about static nested classes in java?

790