Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question for Garbage Collection

 
Sam Sunamin
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Whizlabs,



My answer for it is C since s refer to other object(Hello World) not the object created on line 1, so the object is eligible to collection.

Am I right? Please help me to confirm.

Thank you.
 
megha joshi
Ranch Hand
Posts: 206
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right . C is the correct answer.

One more thing...K&B book states garbage collection with strings is not included in exam.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic