1.Objects that have finalize() methods always have their finalize() methods called before the program ends?? 2.Objects that have finalize() methods are ever garbage collected ?? Please give me some document on Finalize method.
1) when you write a finalize method in your class you are overriding the finalize method (that i suppose to be empty) of the Object class. In this way when the garbage collector destroy the object it is instructed with the "last will" of your class
2) first of all an object is garbageColected when the Garbage collector choose that the time has come, but also one those two conditions have to true: a) the object has been set to null (obj = null b) finalize method of the object has been called;