Which two are Java Exception classes?

A. SercurityException
B. DuplicatePathException
C. IllegalArgumentException
D. TooManyArgumentsException

题解

SecurityException 是一种 RuntimeException,为使用 SecurityManager 类别时会抛出的例外类型,这个在开发 Android 应用程序的时候可能还蛮常见的,因为 Android 系统本身有对程序的权限进行细部控制。

IllegalArgumentException 也是一种 RuntimeException,当传入方法的参数范围有误的时候,常会抛出这种例外。例如:

Integer.parseInt(null);

以上程序会抛出 NumberFormatException,NumberFormatException 是 IllegalArgumentException 的其中一种。