Here you can find the source of getRandom(int min, int max)
public static int getRandom(int min, int max)
//package com.java2s; import java.util.*; public class Main { public static int getRandom(int min, int max) { return new Random().nextInt(max - min) + min; }/*from w w w . j av a2s .c o m*/ }