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 java a pure object oriented language?

965


5 Coding best practices you learned in java?

1016


What are the states of thread in java?

988


Give us the name of the list layoutmanagers in java?

927


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

1161


What is == and === in javascript?

1057


What is the method in java?

1101


Does java runtime require a license?

1072


What are abstract methods in java?

1122


What is unicode in java?

930


What happens when a thrown exception is not handled?

1115


What is the map interface in java programming?

1018


Difference between class#getinstance() and new operator ?

1210


What are the advantages of autoboxing?

1019


What is java full form?

1031