RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
A method is not required to declare in its throws clause any subclasses of RuntimeExeption that might be thrown during the execution of the method but not caught
An RuntimeException is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
NullPointerException is one kind of RuntimeException
A method is not required to declare in its throws clause any subclasses of RuntimeExeption 一个方法不需要申明任何运行时异常的子类异常clause:条款,项目
that might be thrown during the execution of the method but not caught 该方法可能在执行的时候抛出异常而没有捕获that代指a method
An RuntimeException is a subclass of Throwable 运行时异常是Throwable异常的子类
that indicates serious problems that a reasonable application should not try to catch. 该运行时异常指向一个严重的问题 ,这个问题是一个正常的程序不应该试图捕获运行时异常
that(1)代指 An RuntimeException ,that(2)代指 serious problems,,后面又说a indicate:指向,表明 reasonable:合理的
运行时异常的特点是Java编译器不会检查它,也就是说,当程序中可能出现这类异常,即使没有用try-catch语句捕获它,也没有用throws子句声明抛出它,也会编译通过。
非运行时异常 (编译异常): 是RuntimeException以外的异常,类型上都属于Exception类及其子类。从程序语法角度讲是必须进行处理的异常,如果不处理,程序就不能编译通过。如IOException、SQLException等以及用户自定义的Exception异常,一般情况下不自定义检查异常。