Java异常:Throwable及其子类

【Throwable】图谱

在这里插入图片描述

哪些异常属于受检异常

The class {@code Exception} and any subclasses that are not also subclasses of {@link RuntimeException} are checked exceptions. ---->> 类{@code Exception}和任何不属于{@link RuntimeException}的子类的子类都是检查异常【是否可以理解成只有“IOException”及其子类是受检异常呢?】

受检异常应该如何处理

Checked exceptions need to be declared in a method or constructor's {@code throws} clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary. ---->> 检查的异常需要在方法或构造函数的{@code throws}子句中声明,如果它们可以由方法或构造函数的执行抛出并在方法或构造函数边界之外传播

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值