Here you can find the source of randomIntArray(int len, Random rand)
public static int[] randomIntArray(int len, Random rand)
//package com.java2s; //License from project: BSD License import java.util.*; public class Main { public static int[] randomIntArray(int len, Random rand) { int[] out = new int[len]; for (int i = 0; i < len; i++) { out[i] = rand.nextInt();/*from w w w . j a va2 s .c o m*/ if (out[i] < 0) out[i] = -out[i]; } return out; } }