Sorry, if the question seems strange, I did not know how to really do this. So I'm not sure if this question has been asked before.
Take this piece of code:
Object obj = new Object(); Object obj2; obj2 = obj;
So my question is:
When I assign obj
to obj2
, does obj2
point to obj
memory, or does the runtime allocate a new memory block that is identical to obj
memory?
Thanks Ro.
Rohan source share