Page 510 - AP Computer Science A, 7th edition
P. 510
(A) I only
(B) II only
(C) III only
(D) II and III only (E) I and III only
11. Consider the following method.
public static void alterArray(int[] arr) {
int mid = arr.length/2;
for (int i = 0; i < mid; i++) {
int temp = arr[i];
arr[i] = arr[arr.length – i – 1]; arr[arr.length – i – 1] = temp;
} }
If the current state of a matrix mat is 2795
8143 6509
which matrix will result from the alterArray(mat[2])?
(A) 2 7 9 5 3418 6509
(B) 2705 8143 6599
(C) 5972 3418
method call