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