# **一、课前引言**


  • 请看一下代码,你发现什么特殊之处了吗?

      public class MethodOverload {
    public static void main(String[] args) {
    System.out.println("The square of integer 7 is " + square(7));
    System.out.println("\nThe square of double 7.5 is " + square(7.5));
    }
    public static int square(int x) {
    return x * x;
    }
    public static double square(double y) {
    return y * y;
    }
    }

二、如何重载?如何调用?