Here you can find the source of getRandomIntBetween(int low, int high)
public static Integer getRandomIntBetween(int low, int high)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static Integer getRandomIntBetween(int low, int high) { return new Random().nextInt(high - low) + low; }// ww w . j a va2s .c o m }