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

Why set is used in java?

565


How many types of equations are there?

536


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

482


What do you understand by java?

559


Can you give names of Container classes?

1849






What is the use of accept () method in java?

606


What is the difference between assignment and initialization?

550


What are the features in java?

574


What is the abstraction?

584


Why string is not a wrapper class?

640


What are the procedures?

604


What is early binding and late binding in java?

591


What is java thread dump, how can we get java thread dump of a program?

567


What is the purpose of the file class in java programming?

522


How can you write a loop indefinitely in java programming?

547