Here you can find the source of getDouble()
public static double getDouble()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static final Random random = new Random(); public static double getDouble() { return random.nextDouble(); }/*from w w w .ja va 2 s. c om*/ public static double getDouble(double max) { return getDouble() * max; } public static double getDouble(double min, double max) { return max > min ? min + getDouble(max - min) : min; } }