Online Java Compiler By
JavaTpoint.com
import java.util.Random; public class JavaRandomNextLongExample2 { public static void main(String[] args) { Random random = new Random(); for (double i=0;i<5;i++) { //return the next pseudorandom Gaussian value Long val =random.nextLong(); System.out.println(val+" "); } } }
Output