第十六次发博不知道用什么标题好

一、异常处理

1、catch中的“getMessage()”函数:输出错误性质

2、toString()函数:给出异常的类型与性质

3、printStackTrace()函数:之处异常的类型,性质,栈层次及出现在程序中的位置

4、catch (NumberFormatException e ){    ---->子类

  ......}

 catch(Exception ..){            ------>父类

  ......}

5、ArithmeticException          算术异常

   ArrayIndexOutOfBoundsException     数组下标越界异常

   NumberFormatException        字符串转换为数字抛出的异常

真的很开心,我是有多幸运才能遇到你们这样一群人

猜你喜欢

转载自www.cnblogs.com/shi-yuan/p/10754021.html