Page 699 - AP Computer Science A, 7th edition
P. 699
31. (A) Method changeMatrix examines each element and changes it to its absolute value if its row number equals its column number. The only two elements that satisfy the condition r == c are mat[0][0] and mat[1][1]. Thus, –1 is changed to 1 and –4 is changed to 4, resulting in the matrix in choice A.