File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes SCJP practice exam Garbage collection question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

SCJP practice exam Garbage collection question

Edward Lawrence
Greenhorn

Joined: Apr 02, 2010
Posts: 21

The question below was found in the book: SCJP Sun Certified Programmer for Java 6 Study Guide (Exam 310-065). It is the first self test question of Chapter 3.

Why isn't c3 eligible for garbage collection in the following question? Doesn't it equate to null after c1.go(c2) returns?

QUESTION:- When // doStuff is reached, how many objects are eligible for GC?




Regards,
Edward
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19725
    
  20

You should have posted the source in a new post to your existing thread. I'll close this thread and link to it from the other one.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Don't get me started about those stupid light bulbs.
 
subject: SCJP practice exam Garbage collection question