Java OCA OCP Practice Question 1090

Question

Which of the following are unchecked exceptions?

Choose all that apply

  • A. ArrayIndexOutOfBoundsException
  • B. IllegalArgumentException
  • C. IOException
  • D. NumberFormatException
  • E. Any exception that extends RuntimeException
  • F. Any exception that extends Exception


A, B, D, E.

Note

ArrayIndexOutOfBoundsException, IllegalArgumentException, and NumberFormatException are runtime exceptions.

Sorry, you have to memorize them.

Any class that extends RuntimeException is a runtime (unchecked) exception.

Classes that extend Exception but not RuntimeException are checked exceptions.




PreviousNext

Related