This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Lots of people get very confused about that. There are lots of explanations in this thread
Joined: Dec 23, 2003
Paul Clapham wrote:No, it's much simpler than that. It's because all parameters are always passed by value in Java. You can read this Ranch campfire story which explains why that is.
Thanks. Lots of discussions.
as said: "For references to objects, you pass a copy of the reference (the remote control)", reference is the address of the object, so we can say pass by object (reference), On the other side, reference is address, (0x1234), still is a value, so we can say we are passing a value. From this point of view, no any different.
Another question, Integer is an immutable class, like String ?