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...

java Api provided try catch finally ,try catch(its ok) but why try finally and exception occured at try then how the flow is?

Answer Posted / vandana singh

If you want to do a task that must be perform with every situation when exception occurs or not. that you should write the code for this in finally block. cause finally block execute in both situation exception occurs or not.

if an exception occurs then catch block statements execute after that control transfer to finally block.

if any exception not occurs than control transfer to finally block.

Is This Answer Correct ?    26 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between calling start() and run() method of thread?

1122


Name and explain the types of ways which are used to pass arguments in any function in java.

1070


Explain Basics of OOP Language in java

1049


What do you understand by soft reference?

1030


Write an algorithm for quick sort?

1019


How does predicate work in java?

972


Is it possible to use string in the switch case?

1039


How is tree Mirroring implemented?

1063


Can a class extend 2 classes in java?

1027


Is logger a singleton?

944


What is codebase?

988


What about interthread communication and how it takes place in java?

1051


What is array initialization in java?

1077


What purpose do the keywords final, finally, and finalize fulfill?

1090


What is object-oriented paradigm?

1058