title: Should I prefer ThreadLocalRandom or SecureRandom?
body: <p>I know that <code>Random</code> class generates insecure random sequences and I should prefer using <code>SecureRandom</code> when dealing with security. But what about <code>ThreadLocalRandom</code>? Is it more or less secure?</p>
  
  <pre><code>// generate a five-digit numeric confirmation code
  Long code = ThreadLocalRandom.current().nextLong(1, 99999);
  </code></pre>