Here you can find the source of randomDouble()
public static double randomDouble()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static Random random = new Random(System.currentTimeMillis()); public static double randomDouble() { return random.nextDouble(); }//ww w .j a v a2s .co m public static double randomDouble(long min, long max) { return min + (max - min) * random.nextDouble(); } }