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 is equlas() and hashcode() contract in java? Where does it used?

1128


Can we return null in java?

1144


What is serialversionuid?

1084


What are the differences between path and classpath variables?

1040


Does garbage collection occur in permanent generation space in jvm?

1085


Why are lists ordered in java?

1010


What is a static method in java?

1045


Which class is the superclass for all the classes?

1020


Explain about sets?

1017


When do we use synchronized blocks and advantages of using synchronized blocks?

1226


What is passing parameters in java?

1037


What is the static block?

1065


What are java threads?

1125


what is the difference between process and thread? : Java thread

991


How do I know if java is installed?

1082