
2005年8月25日
- public class NullPointerException
- extends RuntimeException
當一個應用在需要一個對象的地方試圖使用 null
時拋出。它們包括:
- 調(diào)用一個
null
對象的實例方法。
- 訪問或修改一個
null
對象的域。
- 將
null
作為一個數(shù)組,使用它的長度。
- 將
null
作為一個數(shù)組,訪問或修改它的插口。
- 將
null
作為一個 Throwable
值拋出。
應用應該拋出該類的實例,指示其它對 null
對象的非法使用。
構(gòu)造子索引
- NullPointerException()
- 構(gòu)造一個沒有詳細消息的
NullPointerException
。
- NullPointerException(String)
- 構(gòu)造一個具有指定詳細消息的
NullPointerException
構(gòu)造子
NullPointerException public NullPointerException()
- 構(gòu)造一個沒有詳細消息的
NullPointerException
。
NullPointerException public NullPointerException(String s)
- 構(gòu)造一個具有指定詳細消息的
NullPointerException
。
-
- 參數(shù):
- s - 詳細消息。
posted @
2005-08-25 13:43 hegen 閱讀(1023) |
評論 (0) |
編輯 收藏
Single inheritance precludes some useful and correct designs.The problems of multiple inheritance arise from multiple inheritance of implememtion, but in many cases multiple inheritance is used to inhert a number of abstract contracts and perhaps one concrete implementtation.Providing a means to inherit an abstract contract without inheriting an implementation allows the typing benefits of multiple inheritance without the problems of multiple implementation inheritance.The inheritance of an abstract contract is termed interface inhertiance.
posted @
2005-08-25 02:14 hegen 閱讀(188) |
評論 (0) |
編輯 收藏