JAVA exception class, JAVA
1. Exception (Exception): An exception that the program can handle.
2
. Error(Error): an error that cannot be processed by the program. These errors indicate that the fault occurs on the virtual machine itself, or occurs when the virtual machine attempts to execute an application, and generally does not need to be processed by a program.
3. Check exceptions (exceptions that must be handled by the compiler): Except for Error, RuntimeException, and its subclasses, all other Exception classes and their subclasses are traceable exceptions. This exception is characteristic of the Java compiler checking it. That is to say, when such exceptions may occur in the program, either catch it with a try-catch statement or throws it with a throws clause declaration, otherwise, compilation fails.
4. Non-check exceptions (exceptions that the compiler does not require to handle): including runtime exceptions (RuntimeException and its subclass) and errors ).