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