Passing a class type variable is like assignment to the formal parameter. That is, what is copied is the reference so no copy of the value is made.
So any changes using the parameter will change the original object.