1 |
|
/* |
2 |
< |
* Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved. |
2 |
> |
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. |
3 |
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
|
* |
5 |
|
* This code is free software; you can redistribute it and/or modify it |
18 |
|
* 2 along with this work; if not, write to the Free Software Foundation, |
19 |
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
* |
21 |
< |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
22 |
< |
* CA 95054 USA or visit www.sun.com if you need additional information or |
23 |
< |
* have any questions. |
21 |
> |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
> |
* or visit www.oracle.com if you need additional information or have any |
23 |
> |
* questions. |
24 |
|
*/ |
25 |
|
|
26 |
|
package java.util; |
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 |
|
*/ |