What is overloading in java?

overloading is the ability to define more than one method with the same name in the same class with different method signatures is part of the method declaration. It is the combination of the method name and the parameter list. class overloadDemo { int c;

public int add(int a,int b) { c=a+b; System.out.println("add="+c);

}

public int add(int a, int b, int d);

{ this.add(5,6);

c=a+b+d; System.out.println("add="+c);

}

public static void main(String arg[]) { int a=5,b=6,d=10;

overloadDemo as=new overloadDemo(); as.add(5,6,10);

}

}