Here you can find the source of randomIntFromInterval(int min, int max)
public static int randomIntFromInterval(int min, int max)
//package com.java2s; //License from project: Apache License public class Main { public static int randomIntFromInterval(int min, int max) { return (int) Math.floor(Math.random() * (max - min + 1) + min); }/*w ww.ja va 2s .c om*/ }