4 ms·
Ah, true... so what is the difference between a reference and a pointer then?
by wspeirs 12y ago
Ah, true... so what is the difference between a reference and a pointer then?
- jjnoakes 12y agoIt depends on which definition of "reference" you are talking about. Pass-by-reference and C++ references are basically the same - aliasing without requiring dereferencing via an operator. Java object references are like C++ pointers. Java is pass-by-value (no aliasing) for all values (ints, bools, object references etc). Java has no object values.