Which of the following statements about Java's garbage collection are true?
a) The garbage collector can be invoked explicitly using a Runtime object. b) The finalize method is always called before an object is garbage collected. c) Any class that includes a finalize method should invoke its superclass' finalize method. d) Garbage collection behavior is very predictable.
ans given: a,b,c.
But, a: we only can request garbage collector using Runtime Object. b: K&B says that , you can't count on the garbage collector to ever delete an object. So Any Code that you put into your class's overriden finalize() method is not guaranteed to run.
I think only correct answer is c. coz: Kalid Mugal's SCJP1.2 Says(Page 253) "Finalizers are not implicitly chained like constructors for subclasses, therefore a finalizer in a subclass should explicitly call the finalizer in its superclass as its last action.