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

what is a simple pendulum​
What is the name of the element The charge The mass number The atomic number
would you smash her.
after your surgery, you tell me that you can't walk your dog anymore. you ask me to walk your dog for $50 a week, and i agree. this monday, i began walking your
select the single best answer. project management differs from management of more traditional activities mainly because of: (i) its limited time frame. (ii) its
what event in 1968 prompted anti war protests to increase throughout the united states
what is 28.5dived by 11 equal explain how you got the answer.
basalt group of answer choices erupts throughout the yellowstone system. does not erupt at the yellowstone system. erupts only in certain parts of the yellowsto
The significance of the Ronald Cotton case: a. it shows that a serial killer can be indicted 20 years after the crimes b. it demonstrates the fallibility of eye
Match each of the words below with its best antonym. Conciliatory Fallacious Dogmatic ? ? ? Uncompromising Logical Flexible