Oracle
1Z0-809 · Question #160
1Z0-809 Question #160: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #160. The question stem and answer options stay visible for context.
Question
The following grid shows the state of a 2D array:
O X O
O O X
X O X
This grid is created with the following code:
char[][] grid = new char[3][3];
grid[0][0] = 'O';
grid[0][1] = 'X';
grid[0][2] = 'O';
grid[1][0] = 'O';
grid[1][1] = 'O';
grid[1][2] = 'X';
//line n1
grid[2][0] = 'X';
grid[2][1] = 'O';
grid[2][2] = 'X';
Which line of code, when inserted in place of //line n1. adds an x into the grid so that the grid contains three consecutive X'S?
Options
- Agrid [1] [3] = 'X';
- Bgrid [1] [2] = 'X';
- Cgrid [2] [0] = 'X';
- Dgrid [0] [2] = 'X';
- Egrid [3] [1] = 'X';
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.