posted 9 months ago
I can tell you right now that the values of variables a and b will not change in the calling code. All parameters in Java are passed by value. That includes reference variables. A reference variable to a mutable object that is passed as a parameter can still be used to make changes to the referenced object that can be observed in the calling code.