Freshers are often surprised when a method changes an array they passed in but cannot change an int. Java always passes a copy of the value, and for objects that value is a reference to the same object. Knowing this tells you when a method can update the caller's data and when you must return the new value instead. "Is Java pass by reference?" is a common interview question, and the correct answer is no.