7.23-7.30 study report

Any unusual circumstances interrupt the normal flow of a program when the program runs become errors or exceptions. An exception on behalf of a non-normal conditions or the wrong object, automatically generated by the program or runtime environment, you can also use the throw statement. You can make the appropriate capture and processing according to need. An error similar to the anomaly, except that representatives of non-recoverable error problem, developers generally can not handle.

     Keywords for java exception handling are 5: try, catch, finally, throw and throws.

    In one approach, when an abnormal condition, there are three treatments: 1. Ignore causing abnormal termination of a program run: 2 using the try-catch capture in place and may be thrown exception handling exception: 3 using the method described in the throws clause specifies exceptions, captured by the upper method calls the method and handle exceptions.

Guess you like

Origin www.cnblogs.com/kdmvp/p/11421258.html