Here you can find the source of randomRange(int min, int max)
public static int randomRange(int min, int max)
//package com.java2s; //License from project: LGPL public class Main { public static int randomRange(int min, int max) { return min + (int) (Math.random() * ((max - min) + 1)); }/* w ww. j a v a2s .c o m*/ }