Gabriel Gigliotti

Greenhorn
+ Follow
since Oct 28, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gabriel Gigliotti

Ok, now I have understood I have clearly made a mistake. Thanks for your kind explanation.
Ciao
Gab
Hello everybody,
I think that b is the right answer because both o Object reference and oa[0] after line x
are pointing to the same object so when I am nulling reference on line x than both o and oa[0]
have a null value.
The object they were pointing to is unreacheable to anything so it can be garbage collected.
After the method has completed oa[0] reference could be assigned to any legal variable but the object it was referring still remain unreacheable.
I am not completely sure of this but this kind of thinking sound reasonable to me.
Please let me know if you agree with this.