Posted on 2006-05-06
Hi, I have a question that I got stuck with while studying my review study guide. The question is:
When an object is passed to a method in Java, the formal parameter will contain a reference to the object. Explain why we say that Java uses pass-by-value (not pass-by-reference, as you might expect)?
My guess would be because resulting value is copied into a location being used to hold the formal parameter's value during method/function execution. Am I right?