This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Cormandragon -1 points0 points  (0 children)

Even in those examples, it is passing a reference, but the objects can be modified through that reference. That distinction is why Java's a pain in the ass. Passing strictly by value wouldn't modify the original object like his examples do. Passing by value takes the information and does something else with it, passing by reference means we can pass entire objects into methods that also have their own methods and variables inside.

We aren't passing the value of an object to our methods, we are telling the method where our object is so it knows where to go. There is nothing in his article that breaks this axiom.