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

4. (D) Short-circuit evaluation of the boolean expression will occur. The expression (num != 0) will evaluate to false, which makes the entire boolean expression false. Therefore the expression (score/num > SOME_CONSTANT) will not be evaluated. Hence no division by zero will occur, and there will be no ArithmeticException t hrow n. W hen t he boolean expression has a value of false, only the else part of the statement, statement2, will be executed.


































































































   1288   1289   1290   1291   1292