aspose 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 75
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: 75
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: 9280
    
  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: 75
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Garbage Collection Program
 
Similar Threads
SC Exam Lab 3 (Question 16), GC
GC problem
Question on GC
Garbage Collection
Garbage Collection question