question archive Write a program that creates a Random object with seed 1000 and displays the first 50 random integers between 0 and 100 using the nextInt(100) method
Subject:Computer SciencePrice:2.89 Bought3
Write a program that creates a Random object with seed 1000 and displays the first 50 random integers between 0 and 100 using the nextInt(100) method.
import java.util.*;
public class RandomVar {
public static void main(String[] args) {
Random rand = new Random();
int num;
for (int i=1; ii++)
{
num = rand.nextInt(100);
System.out.println(i +": " + num);
}
}
}