Yes, because the method's parameter x
now stands for a different array.
Here is the picture again, but now it should show what happens just after the second method call:
operate.print( ar2 );
The picture is not finished.
It should show the parameter x
referring to the second array.
All the other variables (in the main()
method) are correct
and do not need to be changed.