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 are the six ways to use this keyword?
What does you mean in math?
Which package is used for pattern matching with regular expressions?
What is comparable and comparator interface? List their differences
what type of questions asked for barclays technologies pune please send urgent
Is main a function?
Does constructor be static?
How can we make string upper case or lower case?
Explain the difference between static and dynamic binding in java?
What is difference between char array and string?
What if static is removed from main method?
What interface is extended by awt event listeners?
What is difference between this and super keyword?
Can a class extend more than one class?
What is difference between path and classpath?