I think the answer is c. Maybe e. I am not sure of e. someone pls correct me.
a) You can directly free the memory allocated by an object.
-----You can't directly free the memory. Only garbage collector can do this. You can only make the object eligible for garbage collection.
b) You can directly run the garbage collector whenever you want to.
-----You can't run the garbage collector whenever you want to. Garbage collector is a low priority
thread. You dont have any control on this.
c) The garbage collector informs your object when it is about to be garbage collected.
-----I think this is true since the finalize() method will be executed before garbage collecting.This will be a notification for the object.
d) The garbage collector reclaims an object memory as soon as it becomes a candidate for garbage collection.
----GC is a low priority thread and we dont have any control on when it will run to reclaim all the eligible GC'ed objects.
e) The garbage collector runs in low-memory situations.
I think its true. I dont have much explanation..Pls someone add more to this.
Thanks
Ramki.