3 ms·
By you do deference object variables in Java. What do you think the "." operator does?
by jjnoakes 12y ago
By you do deference object variables in Java. What do you think the "." operator does?
- wspeirs 12y agoAh, 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.