Java_常见的RuntimeException

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/Chill_Lyn/article/details/102762166
  • ArithmeticException:算数异常,如果除数为0时。
  • ArrayStoreException:对象数组存入元素时类型不匹配。
  • ClassCastException:对象转换异常
  • ConcurrentModificationException:常出现在迭代器遍历时修改元素
  • DateTimeException:构建日期时异常
  • DOMException:DOM异常
  • IndexOutOfBoundsException:索引越界异常
    • ArrayIndexOutOfException:数组索引越界
    • StringIndexOutOfException:字符串索引越界
  • NegativeArraySizeException:创建数组长度为负数异常
  • NullPointerException:空指针异常
  • NumberFormatException:字符串转换为基本数据类型时异常

猜你喜欢

转载自blog.csdn.net/Chill_Lyn/article/details/102762166