java中的Exception

在这里插入图片描述
IOException是chekced exception,RuntimeException是unchecked exception,checked exception是继承java.lang.exception中,unchecked exception是继承java.lang.runtimeexception和java.lang.error中的类。
checked exception是必须要抛出异常。
而runtime exception是自己要看出的异常。

猜你喜欢

转载自blog.csdn.net/weixin_40867255/article/details/83009820