The main point to understand here is that all parameter passing in
Java is by value.
When the type of the formal parameter is an object reference, then a copy of that actual parameter is sent to the method.
As long as that formal parameter still refers to the original object, you can make changes to it, assuming it is mutable.
But if you point that formal parameter to another object, then you can't affect the original object with it.
In the first case, i=j changes where the formal parameter i points.
In the second case, i[0]=j[0], i still refers to the original array and so you can change its elements using the reference i.