Re:Java is Pass-by-Value, Dammit
by RaleyField on Sunday March 22, 2015 @12:48PM
(#9247402)
> References in Java are pointers
In HotSpot references are double pointers (useful for moving GC), but in general it's up to JVM implementation. Pointers are one form of references, which are usually understood as machine addresses, but not all references have to be pointers.
Re:Java is Pass-by-Value, Dammit
by jjnoakes on Sunday March 22, 2015 @03:22PM
(#9247898)
We aren't taking about implementation details when we talk about object references being pointers in Java. It is actually the language level terminology that is correct to use absent of any specific implementation. See the JLS.
In HotSpot references are double pointers (useful for moving GC), but in general it's up to JVM implementation. Pointers are one form of references, which are usually understood as machine addresses, but not all references have to be pointers.