Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
Consider the following code segment.
int[][] arr = new int[3][5];
What is the value of arr[3]?
arr[3]
0
[0, 0, 0]
null
[0, 0, 0, 0, 0]
An ArrayIndexOutOfBoundsException occurs.
ArrayIndexOutOfBoundsException