Java OCA OCP Practice Question 1391

Question

Which of the following are unchecked exceptions? (Choose three.)

  • A. FileNotFoundException
  • B. ArithmeticException
  • C. IOException
  • D. Exception
  • E. IllegalArgumentException
  • F. RuntimeException


B, E, F.

Note

Unchecked exceptions inherit the RuntimeException class and are not required to be caught in the methods where they are declared.

Since ArithmeticException and IllegalArgumentException extend RuntimeException, they are included as unchecked exceptions, making Options B, E, and F correct.

The rest are checked exceptions, which inherit Exception but not RuntimeException.




PreviousNext

Related