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 Garbage Collection Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Garbage Collection Program" Watch "Garbage Collection Program" New topic
Author

Garbage Collection Program

Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
Hi All,

I have the below Code about Garbage Collections


Can anybody sketch the diagram to better understand how many objects are eligible for garbage collection after the execution of system.gc()

Thanks in advance for your help

Thanks
Srinivas
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

System.gc() is not part of the SCJP6 exam anymore

are you planning on taking SCJP 1.5?
Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
Hi Mahmoud Hossam,

Yes, I am planning to take SCJP 6 Exam, I encountered this Question while Practicing Exam with ExamLab for SCJP 6.

So this type of programs cannot be seen in the real exam right?

any suggestions to pass out the exam

Thanks
Srinivas
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

Srinivas Katta wrote:Hi Mahmoud Hossam,

Yes, I am planning to take SCJP 6 Exam, I encountered this Question while Practicing Exam with ExamLab for SCJP 6.

So this type of programs cannot be seen in the real exam right?

any suggestions to pass out the exam

Thanks
Srinivas


I personally don't think so,but wait for more replies


some people here might know better than me
Moguluri Ravi Kiran
Ranch Hand

Joined: Apr 16, 2010
Posts: 62

This is the Diagram


[Thumbnail for DSC01816.JPG]

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

Well the question is valid, you can always be asked to tell how many objects are eligible for GC. There won't be any questions which rely on the behavior of System.gc() so in the question you can ignore that line. Moguluri's diagram should clear your problem...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Srinivas Katta
Ranch Hand

Joined: Feb 01, 2007
Posts: 76
Hi Ravi Kiran,

Thanks a lot for the explanation, are you preparing for SCJP or you already cleared. my email : [Email Id deleted, read UseTheForumNotEmail]

Thanks
Srinivas
 
 
subject: Garbage Collection Program