Java相对于C++而言,异常类库中为程序员定义了冲足多的异常类型,避免了让程序员编写自己的异常类库而花费大量时间,在此将常见的异常类型罗列如下:
ArithmeticException;
ArrayIndexOutOfBoundsException;
ClassCastException;
IllegalAccessException;
IncompatibleClassChangeException;
IncompatibleType Exception;
InternalException;
IOException;
NullPointerException;
NagativeArraySizeException;
NoClassDefFoundException;
OutOfMemoryException;
RuntimeException;
UnsatisfiedLinkException;
ArithmeticException;
ArrayIndexOutOfBoundsException;
ClassCastException;
IllegalAccessException;
IncompatibleClassChangeException;
IncompatibleType Exception;
InternalException;
IOException;
NullPointerException;
NagativeArraySizeException;
NoClassDefFoundException;
OutOfMemoryException;
RuntimeException;
UnsatisfiedLinkException;