/**函数的重载
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int a = add(3,5);
System.out.println(a);
double b = add(3.3,5.1);
System.out.println(b);
}
//加法运算两个整数的和
public static int add (int a,int b){
return a+b;
}
//加法运算两个小数的和
public static double add (double a,double b){
return a+b;
}
//加法运算三个整数的和
public static int add (int a, int b,int c){
return a+b+c;
}
}