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

An appropriate demonstration of professionalism when your patient is frightened, demanding, or unpleasant is to?
1. 2. helps you find directions on a map can be marked in miles Compass Rose
Nurse is preparing a discharge education plan for a client who has had abdominal surgery. what would be most important for the nurse to include in this plan?
the virtues listed by Aristotle. Choose one and, in at least three sentences, explain how Horatius demonstrated that quality.
The most prominent phrase of jesus's ministry occurs after what event takes place?
The designing of a hotel's hvac system would be considered which type of activity?
Consumers must make choices about what to buy and what to forgo to fulfill wants because?
Which bash shortcut or command re-executes a specific command in the history list?
Which principle is sometimes best remembered by the conclusion that incentives matter?
A disadvantage of the relational database management system (rdbms) is its inability to hide the complexities of the relational model from the user. a) true