When does the finally clause in java exception block never executes?

The finally clause in the try-catch exeception block always executes, irrespective of the occurence of exeception. This is applicable for the normal java program flow. If the execution flow is stopped irreversibly before the finally clause, then the finally block will not be executed.

How can the user achieve that in Java?
Include “System.exit(1);” before the finally block and stop the execution flow of the java program.

FAQ Category: Java Exception

Java pass by value and pass by reference. JSP Life Cycle - explain.

Similar FAQ:


Java FAQ Category