• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Garbage Collection Program

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 74
Netbeans IDE Tomcat Server Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Netbeans IDE Tomcat Server Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 63
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the Diagram
DSC01816.JPG
[Thumbnail for DSC01816.JPG]
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic