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