发布网友 发布时间:2024-10-23 19:29
共1个回答
热心网友 时间:1小时前
public class Main {
public static void main(String args[]) {
int a=1, b=2;
double c=3.5;
System.out.println(method(a, b));
System.out.println(method(c, b));
}
public static int method(int a, int b) {
return a + b;
}
public static double method(double a, double b) {
return a * b;
}
}