Method overloading in Java
public void Square ( int number )
{
int square = number * number;
System.out.printIn(“Method with Integer Argument Called:“+square);
}
public void Square(double number)
{
double square = number * number;
System.out.printIn(“Method with double Argument Called:“+square);
}
public void Square(long number)
{
long square = number * number;
System.out.printIn(“Method with long Argument Called:“+square);
}