Here you can find the source of randomDouble(int min, int max)
public static double randomDouble(int min, int max)
//package com.java2s; /*//from w w w.j a v a2 s . com * Copyright ? 2013 VillageReach. All Rights Reserved. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.util.Random; public class Main { final static Random random = new Random(); public static double randomDouble(int min, int max) { return min + (max - min) * random.nextDouble(); } }