Hands-on brain .5

 

 

 

 Learn: An exception are derived from the Exception class in Java all captured.

          The code error may occur into the try block.
When the program detects the presence of the target will throw an exception when an error. Exception handling code will catch and handle this error.
  catch block code to handle errors.
When an exception occurs, the program control flow goes to the try block catch block.
Regardless of whether there is an exception occurs, finally statement block statement is always guaranteed to be executed.
If no appropriate exception handling code, JVM will end out the entire application.

 

 

 

 

 

 

 

 

 Note: When the nested finally, at different levels thrown exception thrown in different positions, may result in a different execution order finally block

 

Guess you like

Origin www.cnblogs.com/123-haozijia/p/11762778.html
Recommended