checked Exception和unchecked exception
checked Exception:
io,sql等exception,程序无法控制的
unchecked exception:
包括Error与RuntimeException及其子类,如:OutOfMemoryError, UndeclaredThrowableException, IllegalArgumentException, IllegalMonitorStateException, NullPointerException, IllegalStateException, IndexOutOfBoundsException等程序瑕疵。
checked Exception和unchecked exception的更多相关文章
- Java的checked exception与unchecked exception
在Java中exception分为checked exception和unchecked异常,两者有什么区别呢? 从表象来看, checked异常就是需要在代码中try ... catch ...的异 ...
- java中的Checked Exception和Unchecked Exception的区别
Java 定义了两种异常: - Checked exception: 继承自 Exception 类是 checked exception.代码需要处理 API 抛出的 checked excepti ...
- Java异常:选择Checked Exception还是Unchecked Exception?
http://blog.csdn.net/kingzone_2008/article/details/8535287 Java包含两种异常:checked异常和unchecked异常.C#只有unch ...
- checked exception和unchecked exception区别
http://blog.csdn.net/yuefengyuan/article/details/6204317 一. Java 中定义了两类异常: 1) Checked exception: 这类异 ...
- ckecked Exception和Unchecked Exception异常
Throwable 是所有 Java 程序中错误处理的父类 Error JVM Exception 程序 Checked Exception:继承java.lang.Exception 代表程序不能控 ...
- Java 检查异常(checked exception)和未检查异常(unchecked exception)区别理解
所有异常类型都是 Throwable 类的子类,它包含Exception类和Error类,Exception又包括checked exception和unchecked exception. unch ...
- Checked Exception & Unchecked Exception
查Spring事务管理时看到一句话: Spring使用声明式事务处理,默认情况下,如果被注解的数据库操作方法中发生了unchecked异常,所有的数据库操作将rollback:如果发生的异常是chec ...
- 自定义异常时如何定义checked异常和unchecked异常
When defining your own exception type, study the existing exception classes in the Java API and try ...
- [转]Unchecked Exception 和 Checked Exception 比较
Throwable类是所有异常的始祖,它有两个直接子类Error / Exception: Error仅在Java虚拟机中发生动态连接失败或其它的定位失败的时候抛出一个Error对象.一般程序不用 ...
随机推荐
- pyinstaller--将py文件转化成exe
首先要注意一下:打包python文件成exe格式这个过程只能在windows环境下运行 1. 直接在命令行用pip安装 pyinstaller pip install pyinstaller</ ...
- java 学习之路
一.基础篇 1.1 JVM 1.1.1. Java内存模型,Java内存管理,Java堆和栈,垃圾回收 http://www.jcp.org/en/jsr/detail?id=133 http://i ...
- nginx增加ssl服务方法
1.将申请到的ssl加密证书文件拷贝到nginx的conf目录下 如:server.pem.server.key 2.vim nginx.conf 例子: server { listen 443 ss ...
- Spark编译安装和运行
一.环境说明 Mac OSX Java 1.7.0_71 Spark 二.编译安装 tar -zxvf spark-.tgz cd spark- ./sbt/sbt assembly ps:如果之前执 ...
- Emacs简易教程
Emacs简易教程阅读: 命令: $emacs 进入之后,输入: C-h t 这里,C-h表示按住[Ctrl]键的同时按h ####### 20090620 *退出: 输入“C-x C-c” *撤销: ...
- Java Hour 17 来个CURD吧(二)
有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. 突然想到我最近一直在追的小说,作者每天都会更新两章,而且质量挺高.所以从这篇开 ...
- java_ant详解
转自:http://hi.baidu.com/victorlin23/item/721b892c770be3d7a517b695 1,什么是antant是构建工具2,什么是构建概念到处可查到,形象来说 ...
- ubuntu su 密码 (转)
Ubuntu刚安装后,不能在terminal中运行su命令,因为root没有默认密码,需要手动设定. 以安装ubuntu时输入的用户名登陆,该用户在admin组中,有权限给root设定密码. 给roo ...
- Codeforces Round #360 (Div. 1) D. Dividing Kingdom II 并查集求奇偶元环
D. Dividing Kingdom II Long time ago, there was a great kingdom and it was being ruled by The Grea ...
- BestCoder 1st Anniversary B.Hidden String DFS
B. Hidden String Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://bestcoder.hdu.edu.cn/contests/co ...