Bookmark Topic Watch Topic
  • New Topic

SCJP practice exam Garbage collection question  RSS feed

 
Edward Lawrence
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Report post to moderator

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?


 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!