ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jdk7/java/util/Random.java
(Generate patch)

Comparing jsr166/src/jdk7/java/util/Random.java (file contents):
Revision 1.2 by jsr166, Fri Jan 18 04:23:27 2013 UTC vs.
Revision 1.5 by jsr166, Sun Jan 18 20:17:32 2015 UTC

# Line 24 | Line 24
24   */
25  
26   package java.util;
27 +
28   import java.io.*;
29   import java.util.concurrent.atomic.AtomicLong;
30   import sun.misc.Unsafe;
# Line 294 | Line 295 | class Random implements java.io.Serializ
295       * @throws IllegalArgumentException if n is not positive
296       * @since 1.2
297       */
297
298      public int nextInt(int n) {
299          if (n <= 0)
300              throw new IllegalArgumentException("n must be positive");
# Line 368 | Line 368 | class Random implements java.io.Serializ
368       * range {@code 0.0f} (inclusive) to {@code 1.0f} (exclusive), is
369       * pseudorandomly generated and returned. All 2<font
370       * size="-1"><sup>24</sup></font> possible {@code float} values
371 <     * of the form <i>m&nbsp;x&nbsp</i>2<font
371 >     * of the form <i>m&nbsp;x&nbsp;</i>2<font
372       * size="-1"><sup>-24</sup></font>, where <i>m</i> is a positive
373       * integer less than 2<font size="-1"><sup>24</sup> </font>, are
374       * produced with (approximately) equal probability.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines