Multiple choice

Which of the following Exception classes in Java is used to deal with an exception, where an assignment to an array element is of incompatible type?

  1. ArithmeticException

  2. ArrayIndexOutOfBoundsException

  3. IllegalArgumentException

  4. ArrayStoreException

  5. IllegalStateException

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

This Exception class in Java is used to deal with the exception, where an assignment to an array element is of incompatible type.