資源簡(jiǎn)介
Java 方法中拋出異常(基礎(chǔ)篇-實(shí)例159).zip
代碼片段和文件信息
package?com.mingrisoft.exception;
public?class?ThrowException?{
????public?static?void?throwException()?{
????????throw?new?UnsupportedOperationException(“方法尚未實(shí)現(xiàn)“);//?拋出異常
????}
????
????public?static?void?main(String[]?args)?{
????????ThrowException.throwException();//?調(diào)用拋出異常的方法
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????232??2015-08-28?13:54??.classpath
?????文件?????????379??2015-08-28?13:54??.project
?????文件?????????628??2015-08-28?13:54??bin\com\mingrisoft\exception\ThrowException.class
?????文件?????????320??2015-08-28?13:54??src\com\mingrisoft\exception\ThrowException.java
評(píng)論
共有 條評(píng)論