I think the part is cleverly related to the fact that the reference type is usually called pointer , which requires the reader to learn two terms. JVM terminology simply uses the term reference for this.
There is also a historical context.
When Java was introduced, its biggest competitor was C ++. The main problem with C ++ was that it was too complicated. Java initially positioned itself as a lightweight alternative to C ++. It had syntax very close to C ++, but all complex things (operator overloading, templates, multiple pass mechanisms) were removed from this language, etc.
And now the catch is coming ...
Java was originally sold as without pointers . The rationale for saying this was that pointers were considered the most difficult task of C ++, therefore, if Java did not have them, it would be a simpler language.
The clever part, therefore, stems from the simple invention of another term for “pointer”. Call them with a link, and you can declare that Java has no pointers (but no links).
This led to a lot of debate and caused a lot of confusion, especially since C ++ already had the term “link” and uses it for something else (although it is conceptually slightly related). The discussion usually focuses on two camps, where one of them claims that Java really does not have pointers, since you cannot do pointer arithmetic with them, and they do not directly represent the memory address, while the other camp indicates that you have not to be able to do arithmetic with a pointer, to call it a pointer.
In other words, whether it was reasonable to use the term reference is still open for discussion.
source share