Java - Write code to get Random between two integer values

Requirements

Write code to get Random between two integer values

Demo

//package com.book2s;

public class Main {
    public static Integer getRandom(Integer min, Integer max) {
        return (int) (Math.random() * (max - min) + min);
    }//  w  w  w.  j a v a2  s .c  o m
}