java pass by reference and pass by value

Java reference passing and value passing


1. In Java, basic types (int, long, String, etc.) parameter passing are all value passing, that is, the change of the parameter will not change the original value. Other types (list, array, map, etc.) are passed by reference.
2. The basic type is the data type that JDK does not provide method operation.



Reference original text: http://blog.csdn.net/zzp_403184692/article/details/8184751

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326991867&siteId=291194637