public class TestDemo5{
public static void main(String[] args) {
int a = 15;
int b = 30;
int ret = add(a, b);
System.out.println("ret = " + ret);
double a2 = 11.5;
double b2 = 13.5;
double c2 = 20.5;
double ret2 = add(a2, b2, c2);
System.out.println("ret2 = " + ret2);
}
public static int add(int x, int y) {
return x + y;
}
public static double add(double x, double y, double z) {
return x + y + z;
}
}