DEV Community

Discussion on: Why use pointers at all.

 
pentacular profile image
pentacular

It's trivial to show that pass by reference doesn't occur in Java, since changes to the parameter are independent of changes to the argument.

Once you understand that, it should be clear that the "reference value" is not the object that it refers to.

Which means that passing a "reference value" is not passing the object is refers to -- it just passes a means by which to interact with the object it refers to.

Thread Thread
 
jessekphillips profile image
Jesse Phillips

passing a "reference value" is not passing the object is refers to

This is what I have been saying. The object is not passed. A reference is passed and that reference, points to an object.

Thread Thread
 
adam_cyclones profile image
Adam Crockett πŸŒ€

This is impressively long. I feel like you have both made important connection, perhaps you should make a post together 😊 certainly a lot to digest here.