long seed = 0;
Random rand = new Random(seed);
int rand100 = 0;
for(int i = 0; i < 100; i++)
rand100 = rand.nextInt();
System.out.println(rand100);
I wrote this code to get 100 random integer value of given seed. I want to know if there is a way to get 100 random integer value of given seed without using every single random integer in front of it.
Aucun commentaire:
Enregistrer un commentaire