• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Garbage Collection Program

 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
Linux Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.gc() is not part of the SCJP6 exam anymore

are you planning on taking SCJP 1.5?
 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
Linux Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the Diagram
DSC01816.JPG
[Thumbnail for DSC01816.JPG]
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Srinivas Katta
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic