The ThreadLocalRandom Class Some examples in this chapter make use of a pseudorandom generator. The class java.util.concurrent.ThreadLocalRandom provides a pseudorandom generator that is confined to the current thread—that is, it is local to the thread. The ThreadLocalRandom class extends the java.util.Random class, and provides methods that return uniformly distributed numerical values. The ThreadLocalRandom class is