Computer Science, asked by vaishnavimariappan20, 2 months ago

b) What is final block in Java?​

Answers

Answered by Anonymous
1

Answer:

Java finally block is a block that is used to execute important code such as closing connection, stream etc. Java finally block is always executed whether exception is handled or not. Java finally block follows try or catch block.

Answered by Anonymous
2

Answer:

Java finally block is a block that is used to execute important code such as closing connection, stream etc. Java finally block is always executed whether exception is handled or not. Java finally block follows try or catch block.

Explanation:

The finally block will execute when the try/catch block leaves the execution, no matter what condition cause it. It always executes whether the try block terminates normally or terminates due to an exception. The main purpose of finally block is to release the system resources.

Similar questions