Home Help Java M Method Overloading in java
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Method Overloading in java

Advertisement
Polymorphism is the capability of an object to respond uniformly to achieve specific behavior to the method calls

Method Overloading in java

     

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 :
http://www.roseindia.net/answers/viewanswers/215.html

Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 16, 2009

Ask Questions?    Discuss: Method Overloading in java   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
shiv shankar patel
August 25, 2011
method overloading

it's not given the return type
anakha
February 2, 2012
like

very useful details
ajay
March 25, 2012
overloading

i have two method with one argument as double and float if i call a function with long type variable why it will go into float argument function ???
n.vigneshwaran
July 2, 2012
java

what is recursion
n.vigneshwaran
July 2, 2012
java

method overloading is simple parameter
DMCA.com