Polymorphism is the
capability of an object to respond
uniformly to achieve specific behavior to the method calls of the same name
but with different implementations.
In java the concept of Polymorphism is achieved in two ways:
1. Method Overloading
2. Method Overriding
Here we will discuss only the concept of Method Overloading:
-- In a class, the concept of method overloading does not allow the external user to be aware about the internal processing of the system
-- It just allows to user to use the different implementations of same name collected together and react appropriately to the supplied parameters to get the desired output.
-- Method Overloading, allows the user to achieve the compile time polymorphism.
-- Overloaded methods are always the part of the same class. These methods have the same name, but they may take different input parameters.
-- The arguments passed to a overloaded method may differ in type or in number, or both.
-- Overloaded methods may have the same or different return types.
Read more at :
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial