• 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

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi , please help me to understand how garabge collection works ! it's gonna make me crazy !
please tell me in this code how much objct are elligble for GC on line 20

Thanks very much
 
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please QuoteYourSources (it's a copyright thing).

My quick answer to this question is "Who cares?". When programming Java I just don't think about such things very often, or hardly ever, as the GC just tidies up after me. However, I assume you're working through some certification questions, which requires you to be able to work it out. Let's hear your source for the example, and go from there.
 
Adam Satyres
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Cooke wrote:Please QuoteYourSources (it's a copyright thing).

My quick answer to this question is "Who cares?". When programming Java I just don't think about such things very often, or hardly ever, as the GC just tidies up after me. However, I assume you're working through some certification questions, which requires you to be able to work it out. Let's hear your source for the example, and go from there.


Thanks for your reply Tim ! i did already know the answer because it's taken from a simulator of SCJP exams !
but i coundn't know how to find the correct answer ! i don't even why should we know this for the exam !
 
reply
    Bookmark Topic Watch Topic
  • New Topic