Question
JAVA related questions. 1. Which of the following statements will generate a random number between -3 and 3 (inclusive). You can assume there is a
JAVA related questions.
1.
Which of the following statements will generate a random number between -3 and 3 (inclusive). You can assume there is a Random object called generator.
none of these is correct |
generator.nextInt(7)-3 |
generator.nextInt(6)-3 |
generator.nextInt(8)-3 |
generator.nextInt(7)-2; |
generator.nextInt(6)-4 |
generator.nextInt(7)-4 |
generator.nextInt(8)-2 |
generator.nextInt(8)-4 |
generator.nextInt(6)-2 2. values is the following int array:
What is values[4]?
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started