Page 1358 - AP Computer Science A, 7th edition
P. 1358

38. (B) The method copies the elements from columns 3, 4, and 5 into columns 2, 1, and 0, respectively, as if there were a vertical mirror down the middle of the matrix. To see this, here are the values for the given matrix: width = 6, width/2 = 3, numRows = 2. The variable row goes from 0 to 1 and column goes from 0 to 2. The element assignments are
mat[0][0] = mat[0][5] mat[0][1] = mat[0][4] mat[0][2] = mat[0][3] mat[1][0] = mat[1][5] mat[1][1] = mat[1][4] mat[1][2] = mat[1][3]

































































































   1356   1357   1358   1359   1360