//函数的重载,参数个数不同或者,参数类型不同
public class Demo {
public static void main(String[] args) {
System.out.println(add(4,9));
System.out.println(add(4.0,9.0));
System.out.println(add(4,5,6));
}
public static int add(int x , int y){
return x+y;
}
public static int add(int x, int y ,int z){
return x+y+z;
}
public static double add(double x, double y){
return x+y;
}
}