Is Java pass-by-value or pass-by-reference?
Java passes values. For an object argument, the copied value is a reference to the object. A method can mutate that shared object, but assigning a different object to the parameter does not replace the caller's variable. This distinction explains why changing a list can be visible to the caller while reassigning the parameter is not.