Page 1183 - AP Computer Science A, 7th edition
P. 1183
11. (D) The matrix mat consists of an array of rows, mat[0], mat[1], mat[2], eac h of w hic h is an array . T he m et hod alterArray swaps the first and last element of an array, then the second and second-last elements, and so on, until it reaches the middle of the array. The method call alterArray(mat[2]) performs this series of swaps on row 2 of the matrix, resulting in the matrix in choice D.