AssertionError 跟一下那个类是 “is – a”的关系

2023-07-06   


1. RuntimeException
   2. Error
   3. VirtualMachineError
   4. IllegalAccessException
   5. Throwable 答案:
  答案:2
   The class AssertionError is an Error, which denotes an “incorrect condition” as opposed to an “unusual condition” (Exception). Since, the class Error descends from Throwable, AssertionError also has “is-a” relationship with Throwable. Here is the hierarchy –
  
   java.lang.Object
  
   |
  
   +-java.lang.Throwable
  
   |
  
   +-java.lang.Error
  
   |
  
   +-java.lang.AssertionError


相关内容:

  1. 若干个Java基础面试题
  2. 职场跟新同事打招呼常用英语
  3. Java面试题:请问一下代码输出是什么
  4. 职场新人英文自我介绍
  5. 职场新人英文自我介绍
  6. 测试一下你是情场高手还是职场高手