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’s the difference between constructors and other methods?

527


Explain the differences between abstraction and encapsulation?

514


What is method overloading with type promotion?

577


Difference between association, composition and aggregation?

553


Describe 2 different ways to concatenate two strings.

673






Can we overload run() method in java?

589


What are java annotations?

638


What is an argument in java?

503


What are alternatives to java serialization?

595


How does the garbage collector works in java?

564


What is a local class in java?

578


What is lazy programming?

557


What is the use of protected in java?

529


Explain about instanceof operator in java?

601


What is difference between word and integer?

588