title: Default algo for RandomGenerator (L32X64MixRandom) generates the same number each time
body: <p>The default algo for RandomGenerator ie. L32X64MixRandom as of JDK 18 (available since 17), generates the same number each time on individual invocations.</p>
  <pre class="lang-sh prettyprint-override"><code>jshell&gt; java.util.random.RandomGenerator.getDefault().nextInt(100,999)
  $10 ==&gt; 526
  
  jshell&gt; java.util.random.RandomGenerator.getDefault().nextInt(100,999)
  $11 ==&gt; 526
  
  jshell&gt; java.util.random.RandomGenerator.of(&quot;L32X64MixRandom&quot;).nextInt(100, 999)
  $14 ==&gt; 526
  
  jshell&gt; java.util.random.RandomGenerator.of(&quot;L32X64MixRandom&quot;).nextInt(100, 999)
  $15 ==&gt; 526
  </code></pre>
  <p>neither does javadoc sound any special caution:</p>
  <blockquote>
  <p>Returns a pseudorandomly chosen int value between the specified origin (inclusive) and the specified bound (exclusive).</p>
  </blockquote>
  <blockquote>
  <p>Implementation Requirements:
  The default implementation checks that origin and bound are positive ints. Then invokes nextInt(), limiting the result to be greater that or equal origin and less than bound. If bound is a power of two then limiting is a simple masking operation. Otherwise, the result is re-calculated by invoking nextInt() until the result is greater than or equal origin and less than bound.</p>
  </blockquote>
  <p>While other algos including legacy ones seem to have percieveable levels of randomness eg.</p>
  <pre class="lang-sh prettyprint-override"><code>jshell&gt; java.util.random.RandomGenerator.of(&quot;Random&quot;).nextInt(100,999)
  $7 ==&gt; 451
  
  jshell&gt; java.util.random.RandomGenerator.of(&quot;Random&quot;).nextInt(100,999)
  $8 ==&gt; 633
  
  jshell&gt; java.util.random.RandomGenerator.of(&quot;L64X128MixRandom&quot;).nextInt(100, 999)
  $12 ==&gt; 570
  
  jshell&gt; java.util.random.RandomGenerator.of(&quot;L64X128MixRandom&quot;).nextInt(100, 999)
  $13 ==&gt; 844
  </code></pre>
  <p>Is there a reason for this level of determinism with the default choice?</p>
  <p>EDIT: behaviour wrt. streams is pretty similar, the initial value always seem to be the same</p>
  <pre class="lang-sh prettyprint-override"><code>jshell&gt; java.util.random.RandomGenerator.getDefault().ints(100,999).limit(5).toArray()
  $22 ==&gt; int[5] { 526, 860, 258, 558, 820 }
  
  jshell&gt; java.util.random.RandomGenerator.getDefault().ints(100,999).limit(5).toArray()
  $23 ==&gt; int[5] { 526, 866, 448, 654, 684 }
  </code></pre>