Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to use finalize()Method to resources

Answer Posted / nidhi

finalize is the method called(if defined) by garbage
collector just before it calls any object for garbage
collection. You are never sure that when will it be called.
The main aim for defining this method is to release the
resources that the object is holding before the object
could be deleted from the memory. If this method is called
then the object is not deleted from the memory in that
particular run of garbage collection but is deleted in the
next run.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is an empty arraylist null?

1090


What is a buffer in computer?

1000


When do you call copy constructor?

971


Is void a data type?

953


How is treeset implemented in java?

1026


Can list have duplicates in java?

906


Can two objects have same hashcode?

995


Explain when we should make an instance variable private.

1111


How does thread synchronization occurs inside a monitor?

1097


what is function overloading in java?

1294


What is the difference between stored procedure & function?

964


What are the differences between string and stringbuffer?

1120


What is google full form?

1008


Explain the difference between an Interface and an Abstract class?

1171


What is percentage in java?

1002