Hello friends,
The below is one of my prev replies.
See friends, I am pretty clear that finalize() will run atmost once,
all I want to know is that, will it run atleast once when object is garbage collected
Its very good that all users are give detailed information about this problem but I just wanted to know whether the above quote's answer is
YES/NO So I request any senior programmer or a Moderator to just give their comment
on the issue as I am still confused...
Also this doubt arrised from a point from two minute drills from K&B book.
"1. The finalize() method is guaranteed to run once and only once before the
garbage collector deletes an object.
2. The garbage collector makes no guarantees, finalize() may never run."