When I saw Think in Java, I mentioned that Java is transmitted, but it has not attracted attention. Until a practical problem, I realized this most basic problem.
Everything in Java is a value transfer. You can change the attribute value in the referenced object, but it is not possible to change this object reference itself. That is, when an instance of an object is created, Like this: Apple A = New Apple (); A existing is the address of this object instance. This address, that is, the value of a as a parameter is transmitted to a function, A itself will not change.