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 purpose of finalization?

Answer Posted / sandeep

While exception handling if exception is thrown programme
will abort abnormally but it can leads to some problamatic
situation..hence we have to ensure some code will always run
whtever happen..finalization does so. Some useful tasks that
we have to do ( cleaning up some resources or closing some
connection or socket etc) we can gurantee it will be done by
simply putting it in finally block.

It will run always (Unless System.exit() is not called) and
hence future problem can be handled.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are constructors used?

1028


Can the garbage collection be forced by any means?

1002


What is style and indentation?

1018


What are the advantages of autoboxing?

1022


What is :: operator in java 8?

1028


What are the different types of data structures in java?

995


What are 5 boolean operators?

1187


Write a program to find the greatest of three numbers in java?

1012


What about main thread in java?

1129


Is main a function?

1062


What is variable and example?

970


What is the purpose of an interface?

1047


What is the difference between length and length () in java?

951


What are the common uses of "this" keyword in java ?

1024


What is threaded programming and when is it used? : Java thread

1074