java.util
Class Random
java.lang.Object
java.util.Random
public class Random
- extends Object
Pseudo-random number generation.
Method Summary |
int |
nextInt()
|
int |
nextInt(int n)
Returns a random integer in the range 0...n-1. |
Random
public Random(long seed)
Random
public Random()
nextInt
public int nextInt()
- Returns:
- A random positive or negative integer.
nextInt
public int nextInt(int n)
- Returns a random integer in the range 0...n-1.
- Parameters:
n
- the bound
- Returns:
- A random integer in the range 0...n-1.