Java uses “Pass By Value” when arguments are passed to a method. The value of the original variable cannot be changed within the method.
When an object is passed as an argument to a method, actually original objects reference is passed. This is called "Pass by reference". Any change in the attribute of an objects results in changing the original object itself.