I am also doubting a.Also b seems to be not in answer.
a is false as you can make a request to GCor not can make a explicit call to the Garbage Collector. b is false as if suppose before a object is in the way for GCed an could not be collected due to some live reference then second time the finalize will not be called at all. [ January 18, 2007: Message edited by: Sanjeev Singh ]
Well I think it probably depends how you read the question.
The finalise is always called before an object is garbage collected - I'd say that is true. It's just not always immediately before (i.e called the first time it was eligible), but it is always before. I'd doubt in the exam they'd give you a question that ambigious.
And again for invoking the gc using a runtime object, yes you can invoke it, but it doesn't say that it will do anything.
ONLY B IS RIGHT ---WHENEVER A OBJECT IS ABOUT TO BE GARBAGE COLLECTED,BEFORETHIS OPERATION FINALIZER IS ALWAYS RUN.' --YOU CAN ONLY REQUEST gARBAGE COLECTOR,YOU CANT BE SURE IT WILL RUN OR NOT
Comments 1. a. is correct because you can explicitly call gc from a Runtime object ( I wrote code to so). Doesn't mean it will run. 2. b. is incorrect because finalize can be called on an object only once (see K&B pg 253) 3. c and d are incorrect