RuntimeException 和 Checked Exception
我们都知道RuntimeException 和 Checked Exception 在使用语法上的区别,那么具体在什么情况下该使用RuntimeException呢? RuntimeException 表示的是一种程序错误,是由于调用者没有遵循API规范,错误调用引起的,例如我们熟悉的NullException, IndexOutOfBoundsException(数组索引...
2013-12-18 00:26:09 ·
137 阅读 ·
0 评论