Page 1046 - AP Computer Science A, 7th edition
P. 1046
37. (E) There are three things that must be done in each row: • Add an opening boundary line:
s = s + “|”;
• Add the symbol in each square:
for (int c = 0; c < COLS; c++) s = s + board[r][c];
• Add a closing boundary line and go to the next line:
s = s + “|\n”;
All of these statements must therefore be enclosed in the outer for loop, that is,
for (int r = ...)