Q 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 and it will be schedule in due time.. 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.
The answer given is b,c,e.
The exam was created before JVM 1.4. So I'm pretty sure that b is not correct. I think e is correct. How about c?
-->The System.gc() method can be used to request garbage collection, -->Although Java provides facilities to invoke the garbage collection, explicitly, there are no guarantees that it will be run. The program can only request that garbage collection be performed, but there is no way that garbage collection can be forced.
Above two statements says option 'b' is wrong know. friends, pls correct me if i am wrong.
Thanx & Regards Naresh
Don't get me started about those stupid light bulbs.