Here you can find the source of random(int min, int max)
public static int random(int min, int max)
//package com.java2s; //License from project: Open Source License public class Main { public static int random(int min, int max) { return (int) (min + (Math.random() * max)); }/*from ww w .j a v a 2 s.c o m*/ public static double random(double min, double max) { return (min + (Math.random() * max)); } public static long random(long min, long max) { return (min + ((long) Math.random() * max)); } }