Java Reference
In-Depth Information
344
Figure 3
Modifying a Numeric Parameter Has No Effect on Caller
You already saw this difference between objects and primitive types in
Chapter 2
.
As a consequence, a Java method can never modify numbers that are passed to it.
344