Roedy Green might have written, quoted or indirectly quoted
something like:
Actually they are not necessarily. They are sufficiently abstract
they would be implemented with handles, pointers to pointers.
By your own definition, handles are also pointers (because
pointers to pointers are pointers.)
To me, the JLS /defines the meaning/ of words regarding the
field of the programming language Java. So, to me, a "pointer"
in Java is as the word "pointer" is used in the JLS.
For example, an "object" in C++ in something quite different
to an object in Java. So to know what an "object" is in Java,
I'd have to consult the JLS.
So when the JLS said as quoted above, to me, in /can not be
wrong/ by my assumption that the JLS defines the terminology
for Java.
The problem is that Java bashers use this to try to fool people
into thinking that Java can't do the things you do with
pointers in C.
Just today I had a pointer-problem that I could have solved
easily in C, but I was not able to solve in Java.
I was building five tuples using my own tuple class. The
code was shortened for this posting to:
final Tuple t0 = new Tuple( "alpha", "beta" );
final Tuple t1 = new Tuple( "alpha", "gamma" );
final Tuple t2 = new Tuple( "alpha", "beta" );
final Tuple t3 = new Tuple( "alpha", "beta" );
final Tuple t4 = new Tuple( "alpha", "delta" );
Now, I wanted to try my new "Identificator". It is supposed
to return the same reference for two equal objects. So:
TupleIdentificator tupleIdentificator = new TupleIdentificator();
and then
final Tuple v0 = tupleIdentificator.valueOf( t0 );
final Tuple v1 = tupleIdentificator.valueOf( t1 );
final Tuple v2 = tupleIdentificator.valueOf( t2 );
final Tuple v3 = tupleIdentificator.valueOf( t3 );
final Tuple v4 = tupleIdentificator.valueOf( t4 );
Now the references v0, v2, and v3 are expected to be equal,
while the references v1 and v4 should differ. To get a quick
debug output, in C, I'd written:
printf( "%p\n",( void * )v0 );
printf( "%p\n",( void * )v1 );
printf( "%p\n",( void * )v2 );
printf( "%p\n",( void * )v3 );
printf( "%p\n",( void * )v4 );
What would be the equivalent in Java to get a quick debug
output of the five reference values?
I am aware of "System.identityHashCode", but this still gives
me no strict guarantee to have the same behavior as the
actual references in this regard.
So, yes, Java supports pointers, but it does not seem to
support converting them to any external representation.