public class test12 {
public static int TEST (String... b){
for (String s:b) {
System.out.println(s);
}
return 0;
}
//new String[]{} 创建对象数组
public static void main(String[] args) {
String[] a = new String[] { "00", "11", "22", "33", "44", "55", "66"};
System.out.print(test12.TEST(a));
System.out.println(test12.TEST("a","b","c","d"));
}
}
接收参数方法一对比箭头处写的形式
接收参数方法二对比箭头处写的形式
创建对象数组,不是数组对象
String[] a = new String[] { "00", "11", "22", "33", "44", "55", "66"};