package cn.hp.demo3;
/*
* 测试使用方法的重载
* */
public class Test {
public static void sum(int a,int b){
System.out.println(a+"+"+b+"="+(a+b));
}
public static void sum(double a,double b){
System.out.println(a+"+"+b+"="+(a+b));
}
public static void main(String[] args){
Test.sum(1, 2);
Test.sum(1.1, 2.2);
}
}