【Throwable】图谱

Java异常: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}子句中声明,如果它们可以由方法或构造函数的执行抛出并在方法或构造函数边界之外传播

相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2021-09-18
  • 2022-12-23
  • 2021-12-24
  • 2021-08-03
  • 2022-01-01
猜你喜欢
  • 2021-04-03
  • 2021-12-10
  • 2021-07-27
  • 2021-05-19
  • 2021-07-30
  • 2021-10-29
  • 2021-06-10
相关资源
相似解决方案