Q1. How can u force an object to be garbage collected?
A. Remove all refernces from the object
B. You can not force an object to be garbage collected.
there were 2 more option.
I thought A.
but correct ans is given B.
But I think if you remove all references then it will be elgible for garbage collection and will collected by garbage collection
thread.
correct me if I am wrong.