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 / sivadasan

Finally block always execute, its not consider whether an
exception is raised or not. Once try block is executed
means finally will be executed.

Finally block is necessary, often sufficient to execute
some important things its nothing but connection close
stmt..

system.exit(0); given in try catch block means finally
block will not be executed.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a for loop in java?

1031


What are constructors in java?

1080


How will you load a specific locale?

962


Which oo concept is achieved by using overloading and overriding?

998


How do you use compareto?

931


How do you delete a list in java?

938


Explain the difference between static and dynamic binding in java?

1054


What about interrupt() method of thread class ?

1059


What is static method with example?

1155


What is the difference between a synchronized method and a synchronized block?

1059


What is the use of set in java?

1109


What is object in java?

973


What is the primitive type short?

1009


How to check if a list is sorted in java?

1021


Can you pass by reference in java?

964