50 |
|
* <p> |
51 |
|
* Many applications will find the method {@link Math#random} simpler to use. |
52 |
|
* |
53 |
+ |
* <p>Instances of {@code java.util.Random} are threadsafe. |
54 |
+ |
* However, the concurrent use of the same {@code java.util.Random} |
55 |
+ |
* instance across threads may encounter contention and consequent |
56 |
+ |
* poor performance. Consider instead using |
57 |
+ |
* {@link java.util.concurrent.ThreadLocalRandom} in multithreaded |
58 |
+ |
* designs. |
59 |
+ |
* |
60 |
+ |
* <p>Instances of {@code java.util.Random} are not cryptographically |
61 |
+ |
* secure. Consider instead using {@link java.security.SecureRandom} to |
62 |
+ |
* get a cryptographically secure pseudo-random number generator for use |
63 |
+ |
* by security-sensitive applications. |
64 |
+ |
* |
65 |
|
* @author Frank Yellin |
66 |
|
* @since 1.0 |
67 |
|
*/ |