java.util.concurrent · java.base · since Java 1.7

ThreadLocalRandom

declaration
public class ThreadLocalRandom extends Random

Per-thread random generator without contention: the default choice inside concurrent code and parallel streams. Access via current(), never share, never seed.

Key methods

static ThreadLocalRandom current()The calling thread's generator — always call at use site.
int nextInt(int origin, int bound)Range sampling.