Always good as a refresher.
http://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value
So, when calling a method
- For primitive arguments (
int
,long
, etc.), the pass by value is the actual value of the primitive (for example, 3). - For objects, the pass by value is the value of the reference to the object.
http://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value
Comments