File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes gc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "gc" Watch "gc" New topic



Joined: Feb 11, 2000
Posts: 8
Kindly answer my queries on foll. questons
(1) GC
A. You can directly free the memory allocated by an
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.
a) The programmer has a method for immediately freeing the
memory of an object.
b) Garbage collection happens at set intervals of time.
c) The programmer can signify through a reference that an
object is no longer needed.
Is c is right or wrong

Joined: Mar 03, 2000
Posts: 6
For Question 1 . I think C is more appropriate. (It calls Finalize method).wrt to D&E We cant gurantee those things. The GC may run in low-memory situations.
For question 2 . It would be nice to see the whole question and other choices.Assuming that question is some thing to do with GC properties C could be a possible candidate , but here again programmer may signify by invoking finalize but object may again make itself available.can you please post the whole question ??
I agree. Here's the link:
subject: gc
It's not a secret anymore!