Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.ThreadLocalRandom; public class ThreadLocalRandomNextLongExample3 { public static void main(String[] args) { // Returns exception because bound is negative System.out.println("Random long value is: " +ThreadLocalRandom.current().nextInt(-10)); } }
Output