a = new Boolean(true);
b = new Boolean(false);
This does not change the objects that a and b were pointing to(the elements in the array). It points them to new
objects.
It is not modfying the array
To illustrate:
Boolean a = new Boolean(true);
Boolean b = new Boolean(false);
Boolean c = a;
Boolean d = b;
a = new Boolean(false);
b = new Boolean(true);
c and d will still be true/false respectively. This is the same thing that is happening with the array, except your array reference isn't named the same way.