Question: Which is the first line of code that causes an ArrayIndexOutOfBoundsException? A. m1 B. m2 C. m3 D. m4 E. The code does not compile.
Which is the first line of code that causes an ArrayIndexOutOfBoundsException?
![var matrix = new String [1] [2]; matrix [0] [0] matrix [0]](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1707/2/9/4/01165c33d3b5b3931707294011404.jpg)
A. m1
B. m2
C. m3
D. m4
E. The code does not compile.
F. None of the above
var matrix = new String [1] [2]; matrix [0] [0] matrix [0] [1] matrix [1] [0] matrix [1] [1] = // m1 = // m2 "I'm trying to free your mind Neo"; = "Is all around you "; // m3 "Why oh why didn't I take the BLUE pill?"; // m4 "Don't think you are, know you are."; =
Step by Step Solution
3.39 Rating (149 Votes )
There are 3 Steps involved in it
The code in the image shows the initialization and assignment of values to a 2D array in Java T... View full answer
Get step-by-step solutions from verified subject matter experts
