main函数的参数
public class Test {
public static void main(String
[] args
) {
for(int i
=0; i
<args
.length
; i
++) {
System
.out
.println(args
[i
]);
}
}
}
java Test one two three one two three为三个参数,注意参数不是从类名Test开始
转载请注明原文地址: https://yun.8miu.com/read-58696.html