If int[] x = new int[15]; and the statement x[-1] = 0; is executed, then which of the following Exceptions is thrown?
A) IndexOutOfBoundsException
B) ArrayIndexOutOfBoundsException
C) NegativeArraySizeException
D) NullPointException
E) ArithmeticException
Correct Answer:
Verified
Q16: Code Example Ch 08-1
Assume an int array,
Q17: It is possible to sort an array
Q18: Which of the following is a legal
Q19: An array, when instantiated, is fixed in
Q20: A command-line argument is data that is
Q22: Given the following array declaration and instantiation,
Q23: If a and b are both int
Q24: The length operator can be used to
Q25: If any int array, a, is passed
Q26: What does the following statement do? int[]
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents