Hi, I just wanted to know if there is any way we can assure that a particular method will be invoked just before the object is destroyed by the garbage collector. I tried using a finalize() method but don't know if such a method exists. Actually there was this problem statement given by one of my teachers where we had to print the statements "Begin\nStart\nEnd" on the console but the main() method should just have the statement. We can enforce printing "Begin" by putting the print() statement in the constructor of the class, but I am confused as to how to make "End" print only and only when the object is destroyed / removed from memory. Please do help me in this regard.