java.util · java.base · since Java 1.0

Random

declaration
public class Random implements RandomGenerator, Serializable

Seedable pseudo-random generator — reproducible sequences for tests and simulations. For concurrent code use ThreadLocalRandom; for security use SecureRandom.

Key methods

Random(long seed)Deterministic sequence — reproducible tests.
int nextInt(int origin, int bound)Uniform in [origin, bound).
IntStream ints(long size, int origin, int bound)Random streams.