Exception的常见种类
Exception包括RuntimeException(运⾏时异常)和CheckedException(检查异常):
(1)运⾏时异常都是RuntimeException类及其⼦类异常,如:NullPointerException、IndexOutOfBoundsException、ArrayIndexOutOfBoundsException、
ClassCastException、StringIndexOutOfBoundsException、WebServiceException、ArithmeticException等。
nullpointerexception为什么异常(2)检查异常是RuntimeException以外的异常,类型上都属于Exception类及其⼦类,如:NoSuchMethodException、IOException、EOFException、
FileNotFoundException、NumberFormatException、SQLException等。