What is the basically use of finally while we know it
is always executed but why?
Answer Posted / sivadasan
Finally block always execute, its not consider whether an
exception is raised or not. Once try block is executed
means finally will be executed.
Finally block is necessary, often sufficient to execute
some important things its nothing but connection close
stmt..
system.exit(0); given in try catch block means finally
block will not be executed.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the use of jtable?
Which eclipse is best for java?
What is the static method?
What happens when you add a double value to a string?
Is array size fixed in java?
What is object data type?
What is the java reflection api? Why it’s so important to have?
Can we declare the main method of our class as private?
What is an interface in java?
Is 0 a prime number?
What are the advantages of encapsulation in java?
How do you convert string to int in java?
Is int primitive data type?
What is the difference between a scrollbar and a scrollpane?
How are observer and observable used in java programming?