Core Java2(7Th) study(2)The situations that when to throw exception!
来源:互联网 发布:linux bg fg 编辑:程序博客网 时间:2024/06/05 00:40
To understand when (and what) you have to advertise in the throws clause of the methods you write, keep in mind that an exception is thrown in any of the following four situations:
-
You call a method that throws a checked exception, for example, the FileInputStream constructor.
-
You detect an error and throw a checked exception with the throw statement (we cover the tHRow statement in the next section).
-
You make a programming error, such as a[-1] = 0 that gives rise to an unchecked exception such as an ArrayIndexOutOfBoundsException.
-
An internal error occurs in the virtual machine or runtime library.
- Core Java2(7Th) study(2)The situations that when to throw exception!
- Core Java2(7Th) study(1)What sorts of problems do you need to consider?
- Core Java2 6th 摘要(7)
- Core Java2 6th 摘要(2)
- Core Java2 6th 摘要(1)
- Core Java2 6th 摘要(3)
- Core Java2 6th 摘要(4)
- Core Java2 6th 摘要(5)
- Core Java2 6th 摘要(8)
- Core Java2 6th 摘要(6)
- solr-core dependency causing jersey exception when deployed to web application server
- the study of Core Data
- core java2
- When it’s time to quit, that’s the time to carry on.
- HOW TO: Find the Problem Exception Stack When You Receive an UnhandledExceptionFilter Call in the St
- HOW TO: Find the Problem Exception Stack When You Receive an UnhandledExceptionFilter Call in the St
- HV000183: Unable to load 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on th
- found that when click menu then click again, back to main activity but not the one when click menu.
- My 5th Times!
- 折腾了两天,把google搜索加上了,输入框输入内容回车后却不管用,郁闷
- 反射技术与设计模式
- CodeSmith,SqlServer,C#中的类型对照
- LINUX常用网络配置文件的介绍
- Core Java2(7Th) study(2)The situations that when to throw exception!
- .net学习地址
- 什么是Mobile 2.0?
- 因为Google code search,Web从来没有这么不安全过!!!
- Asp.Net22.0中ObjectDataSource+Formview实现添加,修改
- 画脑图方法!
- BeanFactory与ApplicationContext学习
- 去掉程序文件里多余空行
- Solaris上数据保护的一些考虑