Summary of Java Exception Class review

Source: Internet
Author: User
Tags throwable

Personal understanding: The Exception class is a warning that is thrown when there is a problem with the program. You are prompted to program or code where there are errors.

Exception classes and error are inherited from Throwable, and throwable inherit from the object class.

RuntimeException and its subclasses are run-time exceptions (exceptions are not checked)Unchecked exception (not checked), also known as RuntimeException (Runtime exception), the Java compiler does not require that the unchecked exception must be caught or thrown, can not be processed, such exceptions are usually logically wrong, You can avoid this by modifying the code.---------------------------------------------------------except RuntimeException. , collectively, compile-time exception checked exception (checked for exceptions)The Java compiler requires that the check exception must be caught or thrown, that there is no error in the code logic, but that the program is running with an exception due to errors such as IO, which you do not anticipate during the programming phase. If you do not handle these exceptions, the program will definitely go wrong in the future. So the compiler will prompt you to catch and handle this possible exception, and it cannot be compiled without processing.------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- When--------------------------------------------------------catch, an object is present in the declared exception object because the try-to exception enters catch_________________ The _________________________________________________________finally will be executed, but if you do not return here, you must return the value below. If this only changes the value returned in the try, but does not return, or returns the return data in the try, the return value is entered in memory. So return the value in memory, Even if the finally is changed. It will return the value in memory.

Summary of Java Exception Class review

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.