//MethodOverload1.java
// Think about why the following produces an error message.
public class MethodOverload1{
public static void main( String args[])
{
System.out.print("The square of integer 7 is " + square(7));
System.out.print("\nThe square of double 7.5 is " + square(7.5));
}
public int square(int x)
{
return x * x;
}
public double square(double y)
{
return y * y;
}
}