Java.lang.Throwable and its descendant:error and Exception
Source: Internet
Author: User
The Throwable class is a superclass of all errors or exceptions in the Java language, which has 2 subclasses, exception, and error.
Error indicates that a program has undergone a very serious error, cannot be recovered or continues to run, and should not attempt to capture it. Exception represents an exception that can be caught by an application, which can be divided into check-type and unchecked-type exceptions, and non-checked exceptions, commonly known as unchecked Exception, are runtimeexception and their subclasses and do not need to be captured (and, of course, captured). such as Nullpointerexception,indexoutofboundexception, other classes inherited from Exception belong to the check-type exception checked Exception, must be captured, such as IOException, SqlException.
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