Why we need Finally with try?
pls expain with ur example..

Answer Posted / kedar lasane from tuljapur

Because Some Instructions that must be executed in our java
program though there is exception in try block caught by
catch.Once the Exception occurs it catched by catch
statement and control never goes to try block again.So to
Execute some statements after subsequent with try block then
finally {} block is used.Hopefully You find your solution.If
any questions regaurding to java just mail me.
--------------
thnx
my blog: http://www.tuljabhavani.in

Is This Answer Correct ?    34 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

563


Define jit compiler?

649


How can we run a java program without making any object?

533


Compare Mutex and Semaphore in java.

552


What do you mean by stack?

627






What's the purpose of using break in each case of switch statement?

501


What are the fileinputstream and fileoutputstream?

562


Are arrays immutable in java?

533


What is the difference between the file and randomaccessfile classes?

520


What is the maximum size of arraylist in java?

484


What access modifiers can be used for class ?

529


Can we return null in java?

636


Explain the importance of finally over return statement?

600


Explain inner classes ?

641


What is the difference between the boolean & operator and the && operator in java programming?

557