Which of the following statements related to Garbage Collection are correct. Select the two correct answers.
(a)It is possible for a program to free memory at a given time.
(b)Garbage Collection feature of
Java ensures that the program never runs out of memory.
(c)It is possible for a program to make an object available for Garbage Collection.
(d)The finalize method of an object is invoked before garbage collection is performed on the object.
Ans given are (c) and (d).
Would it be correct to say (c) is true?
I've been going back and forth between yes and no. Well it is possible by making the object ref to null, we are suggesting the object can be GCd. But would you call that "it is possible for a program to make an object avail for GC".
Monisha.