Click here to Skip to main content
15,887,776 members
Articles / Security

Difference between Random, SecureRandom and ThreadLocalRandom

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
12 Feb 2023CPOL2 min read 6.5K   2  
Examining the differences between java.util.Random, java.security.SecureRandom, and java.util.concurrent.ThreadLocalRandom to generate random numbers
This post examines differences between java.util.Random, java.security.SecureRandom and java.util.concurrent.ThreadLocalRandom and tells when to use which one of the classes to use to generate random numbers.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions