Value passing: When a method is called, the actual parameter passes its value to the corresponding formal parameter, and the change of the formal parameter value in the method execution does not affect the value of the actual parameter.
Reference delivery: Also known as a pass-through address. When a method is called, the reference to the actual parameter (the address, not the value of the parameter) is passed to the corresponding formal parameter in the method, and in the execution of the method, the operation of the formal parameter is actually the operation of the actual parameter, and the change of the parameter value in the execution of the method will affect the value of the actual parameter.
Java method, if the parameter is a general numeric type, such as int,float (including integer,double these automatic boxing basic Class), which is the value of the transfer, the parameter changes will not affect the actual parameters;
If the argument is an object, or an array, the reference is passed, and the parameter changes affect the value of the argument.
The great God wrote a post that introduces this question: http://blog.csdn.net/sqcthinkingjava/article/details/5924615
There is another: http://bbs.csdn.net/topics/330231529
Problems encountered in Java Learning (i) value passing and reference passing in method calls