For the purpose of exam, do we need to know all unchecked exceptions by name, so that we don't worry about handling them? I understand checked exceptions should be declared or handled, and unchecked exception don't have to. Or is it safe to assume the only unchecked exception (not Error) that will appear in the exam will be RuntimeException only?
If not, is it true to say all subclasses of RuntimeException are the only unchecked exceptions?.. as the list shown below:
--------------------
class java.lang.RuntimeException
class java.lang.ArithmeticException
class java.lang.ArrayStoreException
class java.lang.ClassCastException
class java.lang.IllegalArgumentException
class java.lang.IllegalThreadStateException
class java.lang.NumberFormatException
class java.lang.IllegalMonitorStateException
class java.lang.IllegalStateException
class java.lang.IndexOutOfBoundsException
class java.lang.ArrayIndexOutOfBoundsException
class java.lang.StringIndexOutOfBoundsException
class java.lang.NegativeArraySizeException
class java.lang.NullPointerException
class java.lang.SecurityException
class java.lang.UnsupportedOperationException
-------------------
thanks in advance.
Unni
If not, is it true to say all subclasses of RuntimeException are the only unchecked exceptions?.. as the list shown below:
--------------------
class java.lang.RuntimeException
class java.lang.ArithmeticException
class java.lang.ArrayStoreException
class java.lang.ClassCastException
class java.lang.IllegalArgumentException
class java.lang.IllegalThreadStateException
class java.lang.NumberFormatException
class java.lang.IllegalMonitorStateException
class java.lang.IllegalStateException
class java.lang.IndexOutOfBoundsException
class java.lang.ArrayIndexOutOfBoundsException
class java.lang.StringIndexOutOfBoundsException
class java.lang.NegativeArraySizeException
class java.lang.NullPointerException
class java.lang.SecurityException
class java.lang.UnsupportedOperationException
-------------------
thanks in advance.
Unni