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