wood burning stoves 2.0*
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 Spring in Action this week in the Spring 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: 19720
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCJP practice exam Garbage collection question