Java is strictly pass-by-value for every argument—both primitives and object references. Understanding what actually gets copied onto a method's stack frame explains why reassigning an object parameter leaves the caller untouched while mutating its fields changes the caller's object.
More lessons in Complete Core Java