public class Test{
public static void main(String[] args){
int x = 8;
int y[] = new int[5];
m(x,y);
System.out.println("x is " + x);
System.out.println("y[0] is " + y[0]);
}
public static void m(int number, int numbers[]){
number = 168;
numbers[0] = 888;
}
}
我想問的是为什么x输出的还是1,而输出的y[0]是赋过值的?
|