/* 1 principle of the anomaly mechanism
* What is an exception : Another way of saying something wrong ;
* in java , There is a class that simulates all exceptions , and all exceptions must inherit from this class : Throwable;
* : Span style= "font-family: the song Body;" > When the program goes wrong ,JVM get error message Return to program call at . This is when our programmers write a program that provides a hint mechanism for certain high-risk operations We're suggesting this mechanism relative to the system is a trigger mechanism for handling exceptions
* One is what we see main () inside the function. There is also an invisible Span style= "font-family: the song Body;" > If the program normally finishes executing the program, exit
* All statements in the main () function Follow normal steps , then exit the virtual machine , which is the normal execution of a program . If main () When the statement in the method executes , it jumps to the error line and executes The code of the error mechanism. And then quit the program .
*
* 2 exception mechanism processing form
* the official so-called exception handling mechanism has two kinds :
* Try...catch ...: generally used in the client
* Throws: generally used on the class library side
* Throw: The beginning of the exception prompt
Exception mechanisms in Java (compile-time exceptions)