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
Why string is not thread safe?
What if I write static public void instead of public static void in java?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is the difference between member variables initialization and assignment in a constructor?
what is meant wrapper classes?
What is mean by encoding?
How can you set an applet’s height and width as a percentage?
What do you understand by the term wrapper classes?
What is the difference between interface & abstract class?
Is string is a data type?
What is a newline character in java?
What is JFC?
Why is sizeof not a function?
What is the difference between a static and a non-static inner class in java programming?
Which is fastest collection in java?