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

27. (D) The first for loop places value in the top and bottom rows of the defined rectangle. The second for loop fills in the remaining border elements on the sides. Note that the top + 1 and bottom – 1 initializer and terminating conditions avoid filling in the corner elements twice.


































































































   1334   1335   1336   1337   1338