No, that is written in the spec meaning they can use "reference" to mean reference value. Reference is just an alias to reference value. Like
"The values of a reference type are references to objects."
It doesn't mean that "reference value" means "a reference" in the sense of other languages, such as C++.
But now you are doing what you told me not to do. That is the specification of a different language not for Java.
My only disagreement is about introducing 'object references' or claiming that there is 'pass by reference' -- these exist in neither language.
"All interactions with objects and array is by reference, much like pointers in C."
I had not made reference to either of those things, yet you did take issue with my statement
If that statement means objects are pass by reference. Then I need to defend that Java has it. If it does not, then why do you take such great efforts to disagree with it?
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.
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
11 plus years* active enterprise development experience and a Fine art degree 🎨
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
No, that is written in the spec meaning they can use "reference" to mean reference value. Reference is just an alias to reference value. Like
"The values of a reference type are references to objects."
But now you are doing what you told me not to do. That is the specification of a different language not for Java.
"All interactions with objects and array is by reference, much like pointers in C."
I had not made reference to either of those things, yet you did take issue with my statement
If that statement means objects are pass by reference. Then I need to defend that Java has it. If it does not, then why do you take such great efforts to disagree with it?
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.
This is what I have been saying. The object is not passed. A reference is passed and that reference, points to an object.
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.