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 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
Which computer tools allow you to communicate with coworkers, family,and friends
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
Consider a list of full names formatted “firstname lastname”, like ["jules verne", "alexandre dumas", "maurice druon"]. write a list comprehension that produces a list with the full names in the format “lastname, firstname”. the resulting list should look like ['verne, jules', 'dumas, alexandre', 'druon, maurice']. the simplest solution may involve a nested comprehension: [ …. for … in [ … for … in … ]].
Answers: 3
You know the right answer?
JAVA CHALLENGE ZYBOOKs ACTIVITY
2.18.3: Fixed range of random numbers.
Type two stateme...
Questions
question
Mathematics, 13.01.2021 21:00
question
Arts, 13.01.2021 21:00
question
Mathematics, 13.01.2021 21:00
question
Mathematics, 13.01.2021 21:00
Questions on the website: 13722359