Computer Science, asked by anuham97, 10 months ago


What block is always executed, independently of a exception being raised?
Select
1. throws
2. finally
3.catch
4. throw

Answers

Answered by anutwins2626
3

Answer:

finally

Explanation:

The finally block is always executed after the try block exits, whether ... to specify that a method may raise an exception during its execution.

Answered by kavyapsynergy
0

The finally block is always executed, independently of an exception being raised

Java finally block

  • Finally, in Java, a block is used to run critical program statements such as closing a file or closing a connection, among other things.
  • The java finally block is carried out whether exception rise or not and whether exception handled or not. Regardless of whether or not an exception occurs, a java finally block includes all of the critical statements. Whether or not an exception is thrown, the java finally block is always executed.

Similar questions