2. A programmer carelessly assigned a negative value as index of an array. Which type of exception will be raised during execution? Please select the correct option "A, B, C, D, or E"
A. An IndexOutOfBoundsException is thrown.
B. A NumberFormatException is thrown.
C. The first slot of the array is used.
D. This is an Error, so the program immediately terminates no matter what.
E. The last slot of the array is used
A. An IndexOutOfBoundsException is thrown.
Comments
Leave a comment