public class Array_Test {
public static void main(String[] arge){
int[] a = {1,2,3,4,5};
int[] b;
b = a;
for(int i = 0; i<b.length; i++)
b[i] = b[i]+1;
for(int j = 0;j<a.length;j++)
System.out.println("a["+j+"] ="+a[j]);
}
}
为什么输出a数组的结果是2,3,4,5,6,而不是之前的1,2,3,4,5,