Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.ThreadLocalRandom; public class ThreadLocalRandomNextIntExample5 { public static void main(String[] args) { // Returns a pseudorandom, uniformly distributed integer value between 10 and 20 System.out.println("Random int value is: " + ThreadLocalRandom.current().nextInt(10, 20)); } }
Output