Abnormal
In Java, an exception object is always an instance of a throwable subclass.
The error class system describes the internal errors in the Java running system and the exhaustion of resources.
Errors caused by programming can cause runtimeexception exceptions. Exceptions that are caused by other errors----For example, do not cause an runtimeexception exception because an I/O error caused an error in the program that was run correctly.
The exceptions derived from RuntimeException include the following: 1〉 incorrect type conversions; 2〉 array access across borders; 3〉 attempted to access a null pointer.
Exceptions that are not derived from RuntimeException include:
1〉 attempts to read data from behind the end of the file;
2〉 attempted to open a URL in the wrong format;
3〉 attempts to construct a class object with a string that does not exist when the corresponding class of the string exists;
The principle of dealing with runtimeexception is: if there is runtimeexception, it must be your mistake;
Different browsers can handle different types of URLs, so whether the URL format is wrong depends on the specific environment, not just the program code;
Subclasses of any error in the Java language Specification, as well as subclasses of RuntimeException, are called unchecked exceptions, while other exceptions are called checked exceptions;
Exceptions are thrown only in the following 4 cases:
1〉 calls a method that throws "checked exceptions", such as the ReadLine method of the Bufferreader class;
An error occurred during the operation of the 2〉 program and a "checked exception" was thrown with the throw statement;
3〉 program errors, such as a[-1]=0, throw an "unchecked exception" array subscript out of bounds (arrayindex--outofboundsexception);
An internal error occurred in the 4〉java virtual machine or run-time library;
There is no need to declare a Java internal error. A method must declare all "checked exceptions" that it might throw. If you override a method from the parent class in your own subclass. It is particularly noteworthy that if the parent class method does not throw any "checked exceptions" at all, the subclass can only do so;
In Java, a method without a throws indicator cannot throw any checked exceptions;
For a try/catch code block, the method exits immediately if any code within the method throws an exception, and its type is not specified in the catch;
You should catch and handle exceptions that are known to handle (with catch) and pass exceptions that don't know how to handle (with throws);
For try/catch/finally code blocks, the code in the FINALLY clause is executed, regardless of whether the exception is caught or not;
Although Java programmers must manually set up code in the finally clause to reclaim resources, only a handful of resources require manual recycling because of the "garbage collection" mechanism built into Java.
The Actionperformed method cannot throw any checked exceptions;