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

What is the size of a string in java?

1015


What are inner classes or non static nested classes in java?

1177


What is lazy programming?

1041


What is the difference between instanceof and isinstance?

1062


What is split return?

1004


What is consumer interface?

1001


Explain creating threads by extending thread class ?

1055


What do you understand by an io stream?

1047


What is meant by distributed application? Why are we using that in our application?

947


Does java return by reference?

1011


What is the difference between static class and normal class?

1032


Does chrome use java?

970


What is difference between float and double?

963


When we serialize an object does the serialization mechanism saves its references too?

1021


What is the use of put method?

954