Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.ThreadLocalRandom; public class ThreadLocalRandomIntsExample2 { public static void main(String[] args) { // Returns a stream of pseudorandom int values System.out.println("stream of pseudorandom int value is: " +ThreadLocalRandom.current().ints(20, 30)); } }
Output