package cn.netkiller.test;
import java.util.Random;
public class QueueTest {
public static void main(String[] args) throws InterruptedException {
new Random().ints(10, 33, 38).forEach(System.out::println);
}
}
36
34
34
36
37
35
34
35
34
33
private int salt() {
Random random = new Random();
return random.nextInt(99999999);
}
package cn.netkiller.test;
import java.util.Random;
public class RandomTest {
public static int random(int min, int max) {
var value = new Random().ints(min, (max + 1)).limit(1).findFirst().getAsInt();
return value;
}
public static void main(String[] args) throws InterruptedException {
System.out.println(random(10, 15));
}
}