Java inspected and non-inspected exceptions

Source: Internet
Author: User

Always remember what is the exception of the exam, what is abnormal, and sometimes even confused, hereby simply record for review purposes.

Classification of exceptions:
Java.lang.Throwable
1.Error error: A serious problem inside the JVM. cannot be recovered. The program personnel do not have to deal.
2.Exception exception: a common problem. Through reasonable processing, the program can also return to the normal execution process. Requires the programmer to do the processing.
3.RuntimeException: Also known as non-inspected exception (unchecked exception). This type of exception is a logical problem for programmers. should be held accountable. The Java compiler does not enforce the requirement processing. In other words, this kind of abnormal procedure, can be processed, also can not be processed.
4. Abnormal (checked exception). Such anomalies are caused by some external accidental factors. The Java compiler enforces the requirement for processing. In other words, the program must handle this type of exception.

Common exceptions:
1) Non-inspected: Nullpointerexception,classcastexception,arrayindexsoutofboundsexception,arithmeticexception (arithmetic exception, except 0 overflow)
2) Inspected: Exception,filenotfoundexception,ioexception,sqlexception.


Java inspected and non-inspected exceptions

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.