File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes a question about GC 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 "a question about GC" Watch "a question about GC" New topic
Author

a question about GC

michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
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


--<br />a java beginner from China
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
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 ]
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
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.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
michael wang
Ranch Hand

Joined: Feb 06, 2002
Posts: 35
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
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Sure Michael that's perfect
Brian Lugo
Ranch Hand

Joined: Nov 10, 2000
Posts: 165
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a question about GC
 
Similar Threads
GC
Garbage Collection
Booney mock exam q#65
another GC (levteck.com)
garbage collection