Multiple choice

Which of the following is the subclasses of RuntimeException?

  1. IllegalArgumentException

  2. NullPointerException

  3. IOException

  4. IndexOutOfBoundException

  5. ArithmeticException

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

IOException is not a subclass of RuntimeException class, this class is a Subclass of Exception class. This exception is thrown when invalid inputs/outputs are given. So, this is the correct answer as this is not a subclass of RuntimeException class.