int[] test = {0,1,2,3,4,5};
int[] before = test;
System.out.println(before[2]);
test[2] = 65;
System.out.println(before[2]);
The fi
Why would you not expect this to happen. You are simply assigning two variables to the same array, and then You are assigning index #2 of that array as 65, so, you should get 65 the next time you print what's on index #2.
see examples at http://download.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html