Java Basic Learning--a study of Hanshunping data in recent days (II.)

Source: Internet
Author: User

/*

* Exception

*/

Check Exception: The program is normal, but due to external conditions do not meet the trigger. such as opening files that may not exist, addresses that may not exist, and so on.

Run-time Exception: program bug, such as array out of bounds, 0 is removed, the entry parameter does not meet the conditions.

Error: Rare, may be a program bug, or it may be an environmental issue. such as memory exhaustion. Errors are not processed in the program and are handled by the running environment.

Resources that need to be closed are generally handled in finally. Typically, the following scenarios will not be performed:

1. Finally, an exception occurred in the fast.

2, the program is dead on the thread.

3. The System.exit () method is used in the preceding code.

4. Shut down the CPU.

Java Basic Learning--a study of Hanshunping data in recent days (II.)

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.