Java pass by value and pass by reference.
Pass by value means passing a copy of the value to be passed. Pass by reference means the passing the address itself. In Java the arguments are always passed by value. Java only supports pass by value. With Java objects, the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same Java object. Java primitives too are passed by value.
FAQ Category: Core Java
