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

Answers were Sorted based on User's Feedback



how to use finalize()Method to resources..

Answer / rakesh

finalize() is used to release other resources
held by your object (such as database connections or
file handles)

Is This Answer Correct ?    6 Yes 2 No

how to use finalize()Method to resources..

Answer / 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

how to use finalize()Method to resources..

Answer / srinivasa

As this method is available in object class we can override
the method and provide the code to release the resources.

Is This Answer Correct ?    0 Yes 0 No

how to use finalize()Method to resources..

Answer / sakthivel(gceb)(n.p)pollachi

finalize is one of the keyword in java.if you once declare
a method is final it can not be derived from another
class.you can use them in the form of finalize function name
()

Is This Answer Correct ?    6 Yes 12 No

Post New Answer

More Core Java Interview Questions

Can we define constructor in inner class?

0 Answers  


all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.

8 Answers   CFG,


Will minecraft java be discontinued?

0 Answers  


What kind of variables a class can consist of?

0 Answers  


How many statements can be created with one connection in jdbc?

4 Answers   Polaris,


What is application tier?

0 Answers  


How does Vector implement synchronization?

4 Answers   Ness Technologies,


What is the difference between hashset and treeset in java?

0 Answers  


Can you extend main method in java?

0 Answers  


Can a top level class be private or protected?

0 Answers  


What is difference between this and super keyword?

0 Answers  


Why should we use java?

1 Answers   IBM,


Categories