Cleaning Up Before Garbage Collection the finalize() Method

Cleaning Up Before Garbage Collection the finalize() Method

java provides us to some mechanism for the run some code just before our object is deleted by the garbage collector, which method is use for that. that name is finalize() method,its mainly  for the all classes inherit from class.

Object we have a main prob is that we may have gathered by now, we can\'t count on the garbage collector to ever delete an object.

So, any code that we put into our class\'s overridden finalize() method is not guaranteed to run.its method use for the running a any object but its not guaranteed.

By:umang
Date:2014-03-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related scjp1.5 chap8 Links

scjp1.5 chap8 interview questions and answers for experienced and fresher