Oracle
1Z0-803 · Question #71
1Z0-803 Question #71: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-803 to reveal the answer and full explanation for question #71. The question stem and answer options stay visible for context.
Question
Given the code fragment: int [][] array2d = new int[2][3]; System.out.println("Loading the data."); for ( int x = 0; x < array2d.length; x++) { for ( int y = 0; y < array2d[0].length; y++) { System.out.println(" x = " + x); System.out.println(" y = " + y); // insert load statement here. } } System.out.println("Modify the data. "); for ( int x = 0; x < array2d.length; x++) { for ( int y = 0; y < array2d[0].length; y++) { System.out.println(" x = " + x); System.out.println(" y = " + y); // insert modify statement here. } } Which pair of load and modify statement should be inserted in the code? The load statement should set the array's x row and y column value to the sum of x and y The modify statement should modify the array's x row and y column value by multiplying it by 2
Options
- ALoad statement: array2d(x,y) = x + y;
- BB. Load statement: array2d[x y] = x + y;
- CLoad statement: array2d[x,y] = x + y;
- DLoad statement: array2d[x][y] = x + y;
- ELoad statement: array2d[[x][y]] = x + y;
Unlock 1Z0-803 to see the answer
You've previewed enough free 1Z0-803 questions. Unlock 1Z0-803 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.