public class Random
extends java.lang.Object
Constructor and Description |
---|
Random() |
Modifier and Type | Method and Description |
---|---|
static boolean |
randomBoolean()
Generates a random boolean from a uniform distribution.
|
static byte |
randomByte()
Generates a random byte from a uniform distribution.
|
static char |
randomChar()
Generates a random ASCII char from a uniform distribution.
|
static double |
randomDouble()
Generates a random double from a uniform distribution.
|
static float |
randomFloat()
Generates a random float from a uniform distribution.
|
static int |
randomInt()
Generates a random int from a uniform distribution.
|
static int |
randomInt(int n)
Generates one of n possible results (0, 1, ..., n-1) from a uniform distribution.
|
static long |
randomLong()
Generates a random long from a uniform distribution.
|
static double |
randomNormal()
Generates a random double from a uniform distribution.
|
static short |
randomShort()
Generates a random short from a uniform distribution.
|
public static byte randomByte()
public static char randomChar()
public static short randomShort()
public static int randomInt()
public static int randomInt(int n)
public static long randomLong()
public static float randomFloat()
public static double randomDouble()
public static double randomNormal()
public static boolean randomBoolean()