Here you can find the source of generateRandomNumb(int randomSize, int range)
public static int[] generateRandomNumb(int randomSize, int range)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] generateRandomNumb(int randomSize, int range) { int[] randomNumb = new int[randomSize]; for (int i = 0; i < randomSize; i++) { //generate random numbers randomNumb[i] = (int) (Math.random() * range) + 1; }//from www .j a v a2 s. c om return randomNumb; //return array } }