gaurav wrote:That's a question for you to answer. I'm not the one seeking proof. I already know that Java does not pass by reference.
IS THIS THE RIGHT EXAMPLE OR U WANT ME TO FIND SOMETHING ELSE
user13516748 wrote:But we never do. We only pass primitives or references, never objects. And those primitives and references are always passed by value.
If we passed the Object as method parameter
and make some changes to passed Object state then changes reflects in the calling method.Which is totally irrelevant. For pass-by-reference, we would have to change the value of the parameter (*NOT* the state of the object that the parameter points to) and have that be reflected in the caller.
more specificly, what is pass by reference?Is google broken?