This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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?

Peter Wei Cai
Greenhorn

Joined: Oct 23, 2000
Posts: 2

Which of following are correct?
a, You can directly run the garbage collector whenever you want to
b, You can directly run the garbage collector whenever you want to, but you can not directly free the memory allocated by an object.
c, The garbage collector informs your object when it is about to be garbage collected.
Thank you for any suggestion!
Bin Zhao
Ranch Hand

Joined: Oct 04, 2000
Posts: 73
I think c) is the answer.
Since you can never directly run GC, a) and b) are wrong
Sagar Sharma
Ranch Hand

Joined: Aug 31, 2000
Posts: 92
hi,
c is obviously right because of the mark and sweep algorithm that the gc uses.
sagar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a question about GC?
 
Similar Threads
Garbage Collection
Booney mock exam q#65
Garbage collection
a question about GC
Garbage collection