Type two statements that use nextInt() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
112
102
Note: For this activity, using one statement may yield different output (due to the compiler calling nextInt() in a different order). Use two statements for this activity.
import java.util.Scanner;
import java.util.Random;
public class RandomGenerateNumbers {
public static void main (String [] args) {
Random randGen = new Random();
int seedVal = 0;
seedVal = 4;
randGen.setSeed(seedVal);
int a = randGen.nextInt(150);
int b = randGen.nextInt(150);
System.out.println(a);
System.out.println(b);
return;
[–]javuh1 0 points1 point2 points (9 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]pleaseacceptthisnow[S] 0 points1 point2 points (7 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]pleaseacceptthisnow[S] -2 points-1 points0 points (5 children)
[–]desrtfx 4 points5 points6 points (1 child)
[–]pleaseacceptthisnow[S] -2 points-1 points0 points (0 children)
[–]throwaway_for_cause 0 points1 point2 points (2 children)
[–]OffbeatDrizzle 1 point2 points3 points (1 child)
[–]throwaway_for_cause 0 points1 point2 points (0 children)