Page 923 - AP Computer Science A, 7th edition
P. 923
The reason method III works is that instead of the object references being changed, the object contents are changed. Thus, after exiting the method, the IntPair reference is as it was, but the first and second values have been interchanged. (See explanation to next question for diagrams of the memory slots.) In this question, IntPair is used as a wrapper class for a pair of integers whose values need to be swapped.