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