Modifier and Type | Method and Description |
---|---|
static boolean |
nextBoolean()
Returns true or false with roughly equal probability.
|
static double |
nextDouble()
Returns a random
double between 0 (inclusive) and 1
(exclusive). |
static int |
nextInt()
Returns a random
int between -2147483648 and 2147483647
(inclusive) with roughly equal probability of returning any particular
int in this range. |
static int |
nextInt(int upperBound)
Returns a random
int between 0 (inclusive) and
upperBound (exclusive) with roughly equal probability of
returning any particular int in this range. |
public static boolean nextBoolean()
public static double nextDouble()
double
between 0 (inclusive) and 1
(exclusive). The underlying browser's random implementation is used.public static int nextInt()
int
between -2147483648 and 2147483647
(inclusive) with roughly equal probability of returning any particular
int
in this range. The underlying browser's random
implementation is used.public static int nextInt(int upperBound)
int
between 0 (inclusive) and
upperBound
(exclusive) with roughly equal probability of
returning any particular int
in this range. The underlying
browser's random implementation is used.Copyright © 2016. All rights reserved.