Exception Classes ClassNotFoundException IOEXception Arithmetic Excepti Exception AWTException HNullPointer Exception] RuntimeException IndexOutofBoundsException Object Throwab Several more classes IllegalArgument Exception Linkage error Several more classes Ⅴ irtualMachine Error Error AWTError Several more classes Liang, Introduction to Java Programming, revised by Dai-kaiyu
Liang,Introduction to Java Programming,revised by Dai-kaiyu 6 Exception Classes LinkageError Error AWTError AWTException Throwable ClassNotFoundException VirtualMachineError IOException Exception RuntimeException Object ArithmeticException NullPointerException IndexOutOfBoundsException Several more classes Several more classes Several more classes IllegalArgumentException
System Errors ClassNot Found Exception IOExcepti Arithmetic Exception Exception AWTException lullPointer Excepti RuntimeException IndexOutofBounds Exception Object Throwal Several more classes IllegalArgument Exception System errors are thrown LinkageError Several more classes by/VM and represented in the error class The error VirtualMachine Error class describes internal Error system errors. Such errors AWTErro rarely occur. If one does there is little you can do Several more classes beyond notifying the user and trying to terminate the program gracefully Liang, Introduction to Java Programming, revised by Dai-kaiyu
Liang,Introduction to Java Programming,revised by Dai-kaiyu 7 System Errors LinkageError Error AWTError AWTException Throwable ClassNotFoundException VirtualMachineError IOException Exception RuntimeException Object ArithmeticException NullPointerException IndexOutOfBoundsException Several more classes Several more classes Several more classes IllegalArgumentException System errors are thrown by JVM and represented in the Error class. The Error class describes internal system errors. Such errors rarely occur. If one does, there is little you can do beyond notifying the user and trying to terminate the program gracefully
Exceptions Exceptions are represented ClassNot Found Exception in the exception class that describes errors caused by IOException our program and external Arithmetic Exception circumstances These errors Exception AWTException can be caught and handled by INullPointer Except your program RuntimeException IndexOutOfBounds Exception hrowab Several more classes IllegalArgument Exception LinkageError Several more classes Virtualmachine erro E rror AWTError Several more classes Liang, Introduction to Java Programming, revised by Dai-kaiyu
Liang,Introduction to Java Programming,revised by Dai-kaiyu 8 Exceptions LinkageError Error AWTError AWTException Throwable ClassNotFoundException VirtualMachineError IOException Exception RuntimeException Object ArithmeticException NullPointerException IndexOutOfBoundsException Several more classes Several more classes Several more classes IllegalArgumentException Exceptions are represented in the Exception class that describes errors caused by your program and external circumstances. These errors can be caught and handled by your program
Runtime exceptions ClassNotFound Exception IOException Arithmetic Exception Exception AWTException NullPointerException RuntimeException IndexOutofBounds Exception Object Throwable Several more classes IllegalArgument Exception Linkage error Several VirtualMachine Error Error Runtime exceptions are AWTError represented in the RuntimeException class that Several more classes describes programming errors, such as bad casting access ing an out-of- bounds array, and numeric errors Liang, Introduction to Java Programming, revised by Dai-kaiyu
Liang,Introduction to Java Programming,revised by Dai-kaiyu 9 Runtime Exceptions LinkageError Error AWTError AWTException Throwable ClassNotFoundException VirtualMachineError IOException Exception RuntimeException Object ArithmeticException NullPointerException IndexOutOfBoundsException Several more classes Several more classes Several more classes IllegalArgumentException Runtime exceptions are represented in the RuntimeException class that describes programming errors, such as bad casting, accessing an out-ofbounds array, and numeric errors
Checked Exceptions Vs Unchecked eD Exceptions ORuntimeException, Error and their subclasses are known as unchecked exceptions oAll other exceptions are known as checked exceptions, meaning that the compiler forces the programmer to check and deal with the exceptions Introduction to Java Programming, revised by Dai-kaiyu
Liang,Introduction to Java Programming,revised by Dai-kaiyu 10 Checked Exceptions vs. Unchecked Exceptions ⚫RuntimeException, Error and their subclasses are known as unchecked exceptions. ⚫All other exceptions are known as checked exceptions, meaning that the compiler forces the programmer to check and deal with the exceptions