Java contains a class called Throwable, which describes everything that can be "tossed" as an offence. There are two general types of Throwable objects (i.e., "Inherit from Throwable"). Where the error represents compile time and system errors, we generally do not have to deliberately capture them (except in exceptional cases). Exception is the basic type that can be "tossed" from a class method in any standard Java library. In addition, they can be "tossed" from our own methods and from the occasional events of the run period.
The best way to get a comprehensive idea of a violation is to read the online Java documentation provided by Http://java.sun.com (and, of course, download them better first). In order to have a general impression of the various offences, this work is quite valuable. But we will soon find that there is no special place between an offence and the next one, except for the name. In addition, the number of violations provided by Java is increasing; In essence, it is meaningless to print them in a book. Any new libraries that you get from other places may also provide their own violations. What we need most is the basic concepts and what we can do with these offences.
Java.lang.Exception
This is the basic violation that the program can capture. All other offences are derived from it. It is important to note that the name of the offending representative is a problem, and that the offending name is usually carefully selected and can clearly explain what happened. Violations are not entirely defined in Java.lang, and some are meant to provide support for other libraries, such as util,net and IO--we can see this from their full class names, or observe what they inherit from. For example, all IO violations are inherited from Java.io.IOException.