Oracle
1Z0-819 · Question #176
1Z0-819 Question #176: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #176. The question stem and answer options stay visible for context.
Question
Given:
String[][] arr = {
{"Red", "White"},
{"Black"},
{"Blue", "Yellow", "Green", "Violet"}
};
for(int row = 0; row < arr.length; row++) {
int column = 0;
for(; column < arr[row].length; column++) {
System.out.println("[" + row + "," + column + "]=" + arr[row][column]);
}
}
What is the result?Options
- A[0,0]=Red[0,1]=White[0,2]=Black,[1,0]=Blue[2,0]=Yellow[2,1]=Green[3,0]=Violet
- B[0,0]=Red,[1,0]=Black,[2,0]=Violet
- Cjava.lang.ArrayIndexOutOfBoundsException thrown
- D[0,0]=Red[0,1]=White[1,0]=Black[2,0]=Blue[2,1]=Yellow[2,2]=Green[2,3]=Violet
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.