You might know that Java passes by value, but it helps to understand why. Here's what happens when you pass mutable and immutable ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible resultsSome results have been hidden because they may be inaccessible to you
Show inaccessible results