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 basically use of finally while we know it
is always executed but why?

Answer Posted / srinu

In finally block writing the code of clean up code i.e
means release the database connection,close the file.The
finally block complusary be executed block when ever
exception raised or not all ways execute this finally block

Note:
The following write statement write in try or catch block
it will not execute
System.error(0);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are computer functions?

946


Explain the pointers in Java?

1053


What is lexicographically smallest string?

1068


What is finally and finalize in java?

1094


Can we have this () and super () together?

1044


What is ascii code?

1268


What is oop principle in java?

1167


Is there any case when finally will not be executed?

952


Can you explain the final method modifier?

1011


When should I use singleton?

1040


What is string builder?

895


Can we call virtual funciton in a constructor ?

2205


How to change the priority of thread or how to set priority of thread?

1031


Can we create our own daemon thread?

981


What are daemon Threads in java?

1205