I think the answer is b. You can call the garbage collector by invoking system.gc() method.But there is no gaurantee that the objeects will be collected immediately because garbage collection is usually performed in low memory conditions
Originally posted by ashok khetan:
hi,
which of these options are true for the following question?(from Boone's Mock-exam).
Question 65: Which statements about garbage collection are true?
Select all valid answers.
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 an object�s memory as soon as it becomes a candidate for garbage collection.
e) The garbage collector runs in low-memory situations.