Java异常处理与自定义异常  

Exception Handling and User-defmed Exception in JAVA Programming

在线阅读下载全文

作  者:笪林梅[1] DA Lin-mei (Jiangsu Vocational and Technical College of Finance & Economics, Huai'an 223003, China)

机构地区:[1]江苏财经职业技术学院,江苏淮安223003

出  处:《电脑知识与技术》2010年第02Z期1123-1125,共3页Computer Knowledge and Technology

摘  要:Java程序运行期间发生的错误称为异常.异常产生后,应有相应的异常处理机制来捕获异常或抛出异常。JDK平台为我们提供了丰富和完整的异常类,通过它们来处理程序运行中的错误,防止错误对程序造成影响,确保程序能够安全运行。当这些异常类不能捕获实际应用中的异常时.就需要用户自定义异常。异常处理和用户自定义异常的正确与灵活运用:将有效地增强程序的交互性。增加程序的完整性。The error occured during the Java program names exception. When it happens, there should be a corresponding exception handling mechanism to capture the exception or throw out it. JDK platform provides us with a rich and complete exception classes, through which we can deal with the error during the running of programs, in order to prevent the effect made by the error. Then the program can run safely. When these exception classes can not capture the exception in the practical application, it needs us to define the exception by 9urselves. The same as exception handling ,the accurately and flexiblely using of user-de.fined exception will effectively enhance the interactiveness and the integrity of the program.

关 键 词:异常 捕获 抛出 异常类 自定义异常 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论;自动化与计算机技术—计算机科学与技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象