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

Which is easier .net or java?

1023


Write a program to reverse a number in java?

1036


What is the major advantage of external iteration over internal iteration?

1029


What is a local, member and a class variable?

970


What are the types of java?

1025


What is the finalize method do?

1042


Why is java not 100% pure oops?

1072


How do you check if an arraylist is not empty?

1052


What is predicate in java?

1006


What is an empty class? What functionality does it offer in Java?

1199


What is the difference between compiler and jvm?

978


What is thread synchronization in java?

857


What is the difference between a method and a procedure?

997


What is the difference between comparison done by equals method and == operator?

975


What is the use of singleton class?

903