Java. lang. Exception --- Exception, which can be processed by a program
--- Common method: eg: Exception e
E. getMessage () ---- get exception information
E. toString () --- obtain the exception type and information
E. printStackTrace () --- obtain the exception type, information, and location
--- Category --- exceptions automatically captured by JVM (you can handle them yourself) --- RuntimeException
--- Exceptions that must be captured by developers; otherwise, exceptions cannot be captured through compilation
--- Note --- during method rewriting, the method to be rewritten cannot throw more exceptions than the parent class unless the exception is RuntimeException.
--- Catch does not have to be followed by try, but catch and finally have at least one
--- Try can be followed by multiple catch matches, but note that the exception match is not accurate. The parent class can be connected to the object of the subclass, therefore, the parent class must be placed behind the subclass.
--- If the function tries to catch return fianlly --- then the execution order --- because the function ends when return is encountered and must be executed in any way finally, finally is executed before return.
Java. lang. Error --- Error, system-level Error, which cannot be processed by the program
Author: guomeijuan916