5. (A) The expression (int) (Math.random() ∗ 50); returns an int from 0 to 49. Therefore, adding 1 shifts the range to be 1 to 50, which was required.