摘要:
首先看以下代码 public class Oddity { private static int[] o = new SplittableRandom().ints().limit(1000000).parallel().filter(i->(1&i)==1).toArray(); public s 阅读全文
posted @ 2021-12-24 15:05
衰草寒烟
阅读(125)
评论(0)
推荐(0)
摘要:
经常使用的 java.util.Random 类,是PRNG,采用线性同余算法产生的,也称为伪随机分布。会发生不够随机的情况,比如以下例子: public static void main(String[] args) { for (int i = 0; i < 4096; i++) { int r 阅读全文
posted @ 2021-12-24 14:53
衰草寒烟
阅读(657)
评论(0)
推荐(0)

浙公网安备 33010602011771号