一.
public class t1 {
public static void test(int[] x){
System.out.println(x[0]);
};
public static void main(String[] args) {
int [] a = new int[]{1,2,3,4};
test(a);
}
}
:
1
一.
public class t1 {
public static void test(int[] x){
System.out.println(x[0]);
};
public static void main(String[] args) {
int [] a = new int[]{1,2,3,4};
test(a);
}
}
:
1
本文标题:数组作为方法的形参
本文链接:https://www.haomeiwen.com/subject/mcglkltx.html
网友评论