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...

what is the use of finalize()Method
please explain with an example

Answer Posted / mrudang

Sometimes u have seen that some objects of java need to
perform an non- java resoures like file handler etc..

Now Suppose that object going to distroy.So java provides
the mechanism that some specific action will perform when u
delect or try to distory that object..

The opration that u want to perform when such kind of
object Distory is written in finalize method...

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe different states of a thread.

940


Why java strings are immutable in nature?

979


What is the equal sign?

1029


What is tostring () method?

950


What are the types of exceptions?

988


What is xslt in java?

933


What is stringjoiner ?

909


What is immutable data?

992


How can a gui component handle its own events?

1042


Why does it take so much time to access an applet having swing components the first time?

1872


What is the basic concepts of OOPS?

1129


how can you catch multiple exceptions in java?

968


How do you differentiate abstract class from interface?

913


Why is string builder not thread safe?

1013


What restrictions are placed on method overloading?

1118