title: Is there any reason to write `new Random()` since Java 8?
body: <p>For some reason I used to think that <code>java.util.Random</code> is thread-unsafe, a-la <code>HashMap</code> or <code>BitSet</code>, and <code>Math.random()</code> is implemented either as wrapping access to <code>Random</code> with <code>synchronized</code> block, or <code>ThreadLocalRandom.current().nextDouble()</code>.</p>
  
  <p>Actually it turns out that <a href="https://stackoverflow.com/q/5819638/648955"><code>java.util.Random</code> is thread-safe</a> (via atomics). Hence the takeaway: even if I need some random input in a single thread, it makes sense to use <code>ThreadLocalRandom</code>, because there isn't atomic reads and writes inside, compiled as locked instructions and emitting memory barriers.</p>
  
  <p>Moreover, since Java 8, <code>ThreadLocalRandom</code> is essentially a singleton, its state is kept in some fields of <code>java.lang.Thread</code> class. Therefore method <code>ThreadLocalRandom.current()</code> is not an access to <code>ThreadLocalMap</code>, but just a static field read, i. e. very cheap.</p>
  
  <p>I have two questions:</p>
  
  <ol>
  <li><p>From Computer Science point of view, is the output of several linear congruential random generators (initialized the way <code>ThreadLocalRandom</code>s are) is same "random" as an output of the single linear congruential random generator (the <code>java.util.Random</code> instance)?</p></li>
  <li><p>If answer to the first question is Yes, is there <em>any</em> reason to write the construction <code>new Random()</code> (without seed) instead of <code>ThreadLocalRandom.current()</code>, <em>ever?</em></p></li>
  </ol>
  
  <p>Update. I supposed that calls like <code>ThreadLocalRandom.current().ints().parallel().collect(...)</code> could be incorrect,  because Thread's random generator state might be not initialized in <code>ForkJoinPool</code> worker threads, but appears that <code>ThreadLocalRandom</code> overrides methods <code>ints()</code>, <code>longs()</code> and <code>doubles()</code>, making the above construction correct.</p>