Assuming that a Random object has been created called generator, what is the range of the result

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)

b. generator.nextInt(8) + 1

c. generator.nextInt(12) + 2

d. generator.nextInt(35) + 10

e. generator.nextInt(100) – 50

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Software Solutions

ISBN: 9789353063610

9th Edition

Authors: John Lewis, William Loftus

Question Posted: