Hi buddy
try to be precise.
When there are several methods are by same name even no of parameters are same but atleast one parameter must be different in order to use method overloading facility. return type, throwing exception type and access specifier may changed.
Suppose
-----------------------------------------------------
class
{
void method(int i1,int i2,int i3){}
void method(int i1,int i2,float f){}
void method(int i1,int i2,double l){}
public static void main(
String args[])
{
method(1,1,1); //will invoke first method
method(1,1,1.0f) //will invoke second method
method(1,1,1,0) //will invoke third method
}
}
_________________________________________________________________
go through kathy sierra once for more clarification on this topic.