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