Programming Tutorials

Comment on Tutorial - Method Overloading sample in Java By Ganesh Iyer



Comment Added by : Amujuri Vivek

Comment Added at : 2013-01-08 02:48:50

Comment on Tutorial : Method Overloading sample in Java By Ganesh Iyer
HI,

can any one tell me small but silly doubt about overloading that whether we do overloading using access specifiers.that menas see the below code:

ckass A
{
void overload()
{
System.out.println("overloading ....");
}
private void overload()
{
System.out.println("overloading......");
}
protected void overload()
{
System.out.println(Overloading....);
}
}



class test
{
Public static void main(String a[])
{
A a1=new A();
a1.overload();
}
}

Can any one tell me what is the output for this.


View Tutorial