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

What are exceptions

1155


Why java is call by value?

1083


What is the difference between Grid and Gridbaglayout?

1337


What is the difference between a window and a frame in java programming?

1198


What is string literal in java?

1100


What is a substring of a string?

1232


Why to use nested classes in java?

1186


What is unmodifiable list in java?

997


What is module with example?

1094


What is the char data type?

1057


what is interface in java? Explain

1035


How to create com object in Java?

1121


What is string data?

1034


Why is multiple inheritance not supported in java?

1091


What are the Class Libraries ?

1088