Question 61
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
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
Question 62
Given the code fragment:

Which option represents the state of the num array after successful completion of the outer loop?


Which option represents the state of the num array after successful completion of the outer loop?

Question 63
Given:

What is the result?
A:

B:

C:

D:


What is the result?
A:

B:

C:

D:

Question 64
Given:

What is the result?

What is the result?
Question 65
Which three statements are true about the structure of a Java class?