1.throw statement: When executing the throw statement, the Java compiler immediately stops the routine execution of the program and starts looking for an exception handler that can catch or handle the exception;
2. Exception handlers are written using try/catch/finally.
3. If the current code block has an exception handler, the compiler exits the code block and begins execution of the exception-handling code, and after the exception handler finishes execution, the compiler continues to execute the statement after the handler. If the current code block does not have an appropriate handler, it is looked up in the outer code. If not, the notation structure continues to bubble up until the main () method, if still not, prints an error message and a stack trace and exits.
4. The try statement that handles the resource: The parameter is the object that needs to be cleaned up, regardless of how the try block exits, the object is automatically cleaned up without writing any catch or finally block: try (InputStream is = new FileInputStream (" "){ }。
........... Cond
Java essay Four---java exceptions