Here you can find the source of generateRandomInt(int min, int max)
public static int generateRandomInt(int min, int max)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static int generateRandomInt(int min, int max) { Random random = new Random(); return random.nextInt(max) + min; }//from www .j av a 2s . c o m }