首页 > 试题广场 >

下面属于Runtime Exception的异常是?()

[不定项选择题]

下面属于Runtime Exception的异常是?()

  • ILLegalArgumentException
  • NullPointerException
  • BufferUnderflowException
  • ArithmeticException
Runtime Exception主要包括以下这些:
ArithmeticException, 算术异常
ArrayStoreException, 将数组类型不兼容的值赋值给数组元素时抛出的异常
BufferOverflowException, 缓冲区溢出异常
BufferUnderflowException, 缓冲区下溢异常 
CannotRedoException, 不能重复上一次操作异常 
CannotUndoException, 不能撤销上一次操作异常
ClassCastException, 类型强制转换异常
ClassNotFoundException  类没找到时,抛出该异常
CMMException, CMM异常
ConcurrentModificationException,  对Vector、ArrayList在迭代的时候如果同时对其进行修改就会抛出异常
org.springframework.jdbc.CannotGetJdbcConnectionException  服务器端数据库连接不上时,抛出该异常
CannotGetJdbcConnectionException  网络没有连接或网络中断
DOMException, DOM异常
EOFException, 文件已结束异常 
EmptyStackException, 空栈异常
FileNotFoundException, 文件未找到异常
IllegalArgumentException, 传递非法参数异常
IllegalMonitorStateException, 
IllegalAccessException,    访问某类被拒绝时抛出的异常
IllegalPathStateException, 非法的路径声明异常
IllegalStateException, 非法声明异常
ImagingOpException, 成像操作异常
IndexOutOfBoundsException, 下标越界异常
IOException, 输入输出异常
NegativeArraySizeException, 数组负下标异常
NoSuchMethodException 在类中无法找到某一特定方法时,抛出该异常
NoSuchElementException,    方法未找到异常
NoSuchFieldException 类不包含指定名称的字段时产生的信号(bean中不存在这个属性)
NumberFormatException, 字符串转换为数字异常
NullPointerException, 空指针异常
ProfileDataException, 没有日志文件异常
ProviderException, 供应者异常 
RasterFormatException, 平面格式异常
SecurityException, 违背安全原则异常
SQLException, 操作数据库异常
SystemException, 系统异常
UndeclaredThrowableException,
UnmodifiableSetException, 
UnsupportedOperationException, 不支持的操作异常
发表于 2019-07-02 08:24:41 回复(2)
其实很好区分,你写的代码 编译器要你去try catch不然编译不通过的话,那么就是非运行时异常,如果可以不加trycatch就能编译通过,运行时报错的那就是运行时异常。。
发表于 2020-12-04 17:59:53 回复(0)

运行时异常,是运行时动态检查和处理的异常,如NullPointerException、IndexOutOfBoundException、BufferOverflowException等。


非运行时异常,在编码过程中就需要try catch或throw的异常,如IOException、SQLException、FileNotFoundException等。

发表于 2019-09-05 22:24:40 回复(0)