When passing object arguments to a method, you must keep in mind it is a reference variable that is being passed, and not the actual object itself. A reference variable is a name that points to a location in the computer's memory where the object is stored. This leads to two different types of behavior when an object or a primitive is passed to a method.
When a primitive is passed to a method, it is passed by value. Passing by value means that the numeric value, and not a reference to a variable, is passed to the method.
When a object is passed to a method, it is passed by refernce.