subject

JAVA CHALLENGE ZYBOOKs ACTIVITY
2.18.3: Fixed range of random numbers.
Type two statements that use nextInt() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
112 102
My Previous Incorrect Attempt :
import java. util. Scanner;
import java. util. Random;
public class RandomGenerateNumbers {
public static void main (String [] args) {
Random randGen = new Random();
int seedVal;
seedVal = 4;
randGen. setSeed(seedVal);
/* Your solution goes here */
int first = randGen. nextInt(10);
int second = randGen. nextInt(10);
System. out. println(first*seedVal*14);
System. out. println(second*seedVal*(51/4)+6); }
}
MUST BE USED CODE TEMPLATE:
import java. util. Scanner;
import java. util. Random;
public class RandomGenerateNumbers {
public static void main (String [] args) {
Random randGen = new Random();
int seedVal;
seedVal = 4;
randGen. setSeed(seedVal);
/* Your solution goes here */
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 24.06.2019 10:00
Each time you save a document, you will need to type in the file type in which it should be saved you can select the save button to save it with the same file name if it has been previously saved you will need to select the location to save the file you will need to use the save as dialog box
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
You know the right answer?
JAVA CHALLENGE ZYBOOKs ACTIVITY
2.18.3: Fixed range of random numbers.
Type two stateme...
Questions
question
Mathematics, 30.09.2019 05:30
Questions on the website: 13722367