Mohit K Bansal

Greenhorn
+ Follow
since Mar 06, 2010
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 Mohit K Bansal

Thanks Prithvi for your time. I also have the same understanding.
Guys, i did a quick search and found the similar post
https://coderanch.com/t/452512/java-programmer-SCJP/certification/help-garbage-collection

I was also thinking that "only one object will be available after GC" but the site says 2. I think they need to correct the answer.

Regards,
Mohit
I have some confusion with this code (source:http://examsguide.com/scjp/freequestions2.html [Q. 13]):

After line 6, how many objects are eligible for garbage collection?

Ans: 1
Ans: 2
Ans: 3
Ans: 4
None of the above

The correct answer is 2 (according to the site) but its not clear to me why its 2. Will you guys please explain me. Thanks in advance.