常见的异常类型

常见的异常类型:
Exception-----------------------------------异常层次结构的父类


ArithmeticException-------------------------算术错误情形,如:以零做除数
ArrIndexOutOfBoundsException----------------数组下标越界
NullPointerException------------------------尝试访问null对象成员(空指针异常)
ClassNotFoundException----------------------不能加载所需的类
IllegalArgumentException--------------------方法接收到非法参数
ClassCastException--------------------------对象强制类型转换出错
NumberFormatException-----------------------数字格式转换异常 如:把"abc"转换成数字
InputmismatchException----------------------输入异常

猜你喜欢

转载自blog.csdn.net/the_next_one_is_you/article/details/80029721
今日推荐