Card 70 / 76: Identify the statements that correctly orient the exceptions to the superclasses. (Choose all that apply.)
A)
NumberFormatException is a subclass of IllegalArgumentException.
B)
IllegalArgumentException is a subclass of NumberFormatException.
C)
IndexOutOfBoundsException is a subclass of ArrayIndexOutOfBoundsException.
D)
ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException.
Answer:
A) NumberFormatException is a subclass of IllegalArgumentException.
D) ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException.
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
NumberFormatException is a subclass of IllegalArgumentException.
ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException.
B and C are incorrect.
B is incorrect because IllegalArgumentException is not a subclass of NumberFormatException, because IllegalArgumentException is the a superclass of NumberFormatException.
C is incorrect because IndexOutOfBoundsException is not a subclass of ArrayIndexOutOfBoundsException, because IndexOutOfBoundsException is a superclass of ArrayIndexOutOfBoundsException.
|