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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Mock question for Garbage Collection" Watch "Mock question for Garbage Collection" New topic
Author

Mock question for Garbage Collection

Sam Sunamin
Ranch Hand

Joined: Mar 16, 2007
Posts: 113
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.


Yours Sam<br />SCJP5.0 97%<br />SCBCD5.0 72%
megha joshi
Ranch Hand

Joined: Feb 20, 2007
Posts: 206
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock question for Garbage Collection
 
Similar Threads
Garbage Collection
Gc
GC Question
Garbage Collection
Dan exam doubt 19