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

3. (C) The expression (int)(Math.random() ∗ 49) produces a random integer from 0 through 48. (Note that 49 is the number of possibilities for num.) To shift this range from 2 to 50, add 2 to the expression.


































































































   1286   1287   1288   1289   1290