Savadt719 Savadt719
  • 21-10-2020
  • Computers and Technology
contestada

Assume a random number generator object named randGen exists. What are the possible values for randGen.nextInt(6)?
a. 0...5
b. 0...7
c. 1...6
d. 0...6

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 21-10-2020

Answer:

a. 0...5

Explanation:

Given

randGen.nextInt(6)

Required

Determine the range of values

Using randGen object,

The syntax to generate a random integer is randGen.nextInt(n)

Where the range is 0 to [tex]n - 1[/tex]

In this case;

n = 6

So, range is 0 to 6 - 1

Range: 0 to 5

Hence;

Option A answers the question

Answer Link

Otras preguntas

how is othello characterized from acts 1 to act 2 scene pls help will mark branliest
How does race play a role in growth and development of an individual in American society?
Can someone pleaseeee help and if you’re correct I’ll give u brainliest
what led to the increase population in northern cities?
I will give branliest if u hellp me plz ASAP Find the next three terms of the sequence. –2, –12, –72, –432, …
Please help me because I don’t know
hello goodevening every one​
PLS HELP!! For the function f(x)=x+9. Find (f x f^-1)(5)
18 A bank charges a $ 10 fee to open an account. Which of the following equations best represents the total amount in the account, m, when starting with d, doll
What new information does Cassie learn about what happened to Mr. Morrison’s family? This is from chapter 7 of ROTHMC, and I REALLY need the answer because the