Here you can find the source of generateRandomIntegerArray(int size, int min, int max)
public static Integer[] generateRandomIntegerArray(int size, int min, int max)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static Integer[] generateRandomIntegerArray(int size, int min, int max) { Random random = new Random(System.currentTimeMillis()); Integer array[] = new Integer[size]; for (int i = 0; i < size; i++) { array[i] = random.nextInt(max - min + 1) + min; }/*from w w w . java 2 s . c om*/ return array; } }