Methods and Pass-by-Value
Packaging behaviour under a name, and what a method can and cannot change for its caller.
One sentence in this topic is worth the rest of it — Java passes everything by value, including references — and it is the sentence that makes object behaviour predictable for the first time. Expect the two examples in the middle to feel repetitive; they are surface-different on purpose, because that is what makes the idea travel.
Contents
10 cardsnot started