C++ supports pointers whereas Java does not. But when many programmers questioned how you can work without pointers, the promoters began saying \"Restricted pointers.” So we
Another important different between Java and C/C++ is that references are an index to an object. Whereas in C/C++ a pointer is an address in memory.
In the 32-bit JVM, they are the same thing, however in the 64-bit JVM they are not. Where you will notice this difference is that for heap sizes less than 32 GB, references are still 32-bit (even in a 64-bit JVM) This is because objects are allocated on an 8 byte boundary, so the index can refer to up to 32 GB of memory (4 G * 8 bytes)
In a 64-bit C/C++ programs, a pointer needs to be able to reference every byte even though memory allocation is on a 16 byte boundary and so it is 64-bit in size (technically it should be possible to make it 32-bit for less than 4 GB of memory.)
A smart pointer needs two underlying pointers (for a total of 16 bytes) but on gcc, the minimum allocation size for the reference count is 32 bytes (And then you have the size of the object you point to) The total size is 32 bytes + 16 bytes per pointer. c.f. 4 bytes per reference in Java. (8 bytes if you have 32+ GB of heap)
In summary, a Java reference doesn't have to be the actual address or even the same size as a pointer. It certainly much smaller than a smart pointer.