See the memory model : ( rather draw it :")
a1(e.g :2000--ref.value) ---------- [ 1, 1 ,1 ]
a2=2000--copy of a1. means the a2 also point to same area on heap.
so [1,1,1] objectstate has two refernces , a1 & a2(local to function)
So thr ref contens are changed, BUt when the function is over , a2 since local destroyed.
Just see the o/p :
It is 20 & address(some hex no)
not 10 & null