When finally clause is executed?
Answers were Sorted based on User's Feedback
Answer / debapriya patra
A finally clause will execute always wheather the try block
throw any exception or not.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / dinesh
Finally clause is used to handle an exception that is not
caught by any of the previous catch statements.Finally
block can be used to handle any exception generated within
a try block.It may be added immediately after the try block
or after the last catch block.When a finally block is
defined,this is guranteed to execute,regardless of whether
or not an exception is thrown.used in house-keeping
operations like closing files and releasing system
resources.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sushant
This is a block which provide gurantee about the particular
code execution, whether there is exception or not.
| Is This Answer Correct ? | 2 Yes | 1 No |
java Api provided try catch finally ,try catch(its ok) but why try finally and exception occured at try then how the flow is?
How to sort array of 0 and 1 in java?
What are the advantages of compiled language?
How can we create objects if we make the constructor private ?
Difference between Application and Applet ?
how to split string in java?
What is a copy constructor in java?
What is constant in programming?
Explain about global variables in Java?
What is adapter class?
Does sprintf add a null terminator?
Can a main method be declared final?