• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

a question about GC

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please choose all correct description about Garbage Collection:
A. You can directly free the memory allocated by an object.
B. You can directly run the garbage collector whenever you want to.
C. The garbage collector informs your object when it is about to be garbage collected.
D. The garbage collector reclaims your object's memory as soon as it becomes a candidate for garbage collection.
E. The garbage collector runs in low-memory situations.
is the answer E
thanks a lot
 
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A. You can directly free the memory allocated by an object. FALSE
B. You can directly run the garbage collector whenever you want to. FALSE
C. The garbage collector informs your object when it is about to be garbage collected. this is TRUE as finalize() method is called before actually destroying an object.
D. The garbage collector reclaims your object's memory as soon as it becomes a candidate for garbage collection. FALSE as we don't know when it would actually run after an object becomes eligible for GC.
E. The garbage collector runs in low-memory situations. Not necesssarily, so FALSE

Originally posted by wangjiaxin:
Please choose all correct description about Garbage Collection:
A. You can directly free the memory allocated by an object.
B. You can directly run the garbage collector whenever you want to.
C. The garbage collector informs your object when it is about to be garbage collected.
D. The garbage collector reclaims your object's memory as soon as it becomes a candidate for garbage collection.
E. The garbage collector runs in low-memory situations.
is the answer E
thanks a lot


[ February 06, 2002: Message edited by: mark stone ]
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wangjiaxin,
Welcome to Javaranch "a friendly place for Java greenhorns"
This topic has been heavily discussed, you can use our search engine and search for the keywords "garbage collection" or whatever makes sense and you'll get plenty of answers to that question.
Moreover, we'd like you to read the Javaranch Naming Policy and register again.
Thank you for your cooperation.
 
michael wang
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Valentin Crettaz:
wangjiaxin,
Welcome to Javaranch "a friendly place for Java greenhorns"
This topic has been heavily discussed, you can use our search engine and search for the keywords "garbage collection" or whatever makes sense and you'll get plenty of answers to that question.
Moreover, we'd like you to read the Javaranch Naming Policy and register again.
Thank you for your cooperation.


thanks for Valentin Crettaz
i have made it as michael wang
is it ok now?
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure Michael that's perfect
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always thought that GC runs in a low memory situation. Can annyone point to authentic resource(s) where it explicitly says "GC may not necessarily run in a low memory situation".
Thanks,
Brian
 
Attractive, successful people love this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic