In Java parameters to methods (primitive types or object references) are passed by value.
The program illustrates this aspect, which sometimes appears to be a subtle issue.