Java – Finally

Java – Finally 2017-08-09T13:10:09+00:00

Java Finally :

Java supports another statement known as finally statement that can be used to handle an exception that is not caught by any of the previous catch statements.

We can put finally block after the try block or after the last catch block.

The finally block is executed in all circumstances. Even if a try block completes without problems, the finally block executes.

EX :

 


Output :
Division by zero
This is final

Prev Next