hi all :) ,
my question is :
What was LOST and What was GAIEND in java with not including the pointers in C++?
and can u give me an example plz
thanks :)
Java does have pointers (they're called 'references'), it got rid of pointer arithmetic
though, for reasons of garbage collection mainly; think of this:
-
T[] ta= new T[54];
-
T* pT= &ta[41]; // not possible in Java
-
pT++; // not possible in Java
-
ta= null;
Should ta be eligible for garbage collection? What about array bounds checking
w.r.t. pointer (referernce) pT?
kind regards,
Jos