Question: Assuming that a Random object has been created called generator, what is the range of the result of each of the following expressions? a. generator.nextInt(20)
Assuming that a Random object has been created called generator, what is the range of the result of each of the following expressions?
a. generator.nextInt(20)
b. generator.nextInt(8) + 1
c. generator.nextInt(12) + 2
d. generator.nextInt(35) + 10
e. generator.nextInt(100) – 50
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
a 0 to 19 inclusive ... View full answer
Get step-by-step solutions from verified subject matter experts
