标签:=== main rgs class 图片 loading lan double com
public class MethodDemo05 {
public static void main(String[] args) {
int add1 = add(1, 2);
System.out.println(add1);
System.out.println("==============");
int add2 = add(1, 2, 3);
System.out.println(add2);
System.out.println("==============");
double add3 = add(1.0, 2.0, 3.0);
System.out.println(add3);
}
public static int add(int a,int b) {
return a + b;
}
public static int add(int a,int b,int c) {
return a + b + c;
}
public static double add(double a,double b,double c) {
return a + b + c;
}
}
?
public class MethodDemo06 {
public static void main(String[] args) {
for ( int i = 0; i < args.length; i++ ) {
System.out.println("args[" + i + "]: " + args[i]);
}
}
}
cmd窗口:
标签:=== main rgs class 图片 loading lan double com
原文地址:https://www.cnblogs.com/duoruic/p/14934810.html