Assume that we have a Random object referenced by a variable called generator. Which of the following lines will generate a random number in the range 5-20 and store it in the int variable randNum?

a)```
randNum = generator.nextInt(15) + 5;
```
b)```
randNum = generator.nextInt(15) + 6;
```
c)```
randNum = generator.nextInt(16) + 5;
```
d)```
randNum = generator.nextInt(16) + 6;
```
e) none of the above

c)```
randNum = generator.nextInt(16) + 5;
```

Computer Science & Information Technology

You might also like to view...

Which color correction feature has the effect of changing a photo's color intensity?

A) resolution B) Color Temperature C) saturation D) tint

Computer Science & Information Technology

Documentation is an important part of building a good worksheet

Indicate whether the statement is true or false

Computer Science & Information Technology