Which of the following is a checked exception?
B.
ClassCastException, ArrayIndexOutOfBoundsException, and IllegalArgumentException are unchecked exceptions and can be thrown at any time.
IOException is a checked exception that must be handled or declared when used.
Option B is the correct answer.