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

What kind of variables can a class consist?

801


Can private class be extended java?

766


Is zero a natural number?

778


What is primitive data type in java?

736


Explain the difference between treeset and treemap in java?

753


What does the “static” keyword mean? Can you override private or static method in java?

825


What is a newline character in java?

790


What is scope of a variable?

832


How do you clear an arraylist in java?

709


Why singleton class is used in java?

818


Is jdk required on each machine to run a java program?

1013


What the difference is between execute, execute Query, execute Update?

589


Can the garbage collection be forced by any means?

727


What is final keyword?

874


What is the difference between iterator and enumeration ?

749