Posted in 面试题 onFebruary 21, 2012
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
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
AssertionError 跟一下那个类是 “is – a”的关系
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@