Here you can find the source of randInt(int n)
public static int randInt(int n)
//package com.java2s; import java.util.Random; public class Main { private static Random rand; /**//from www . j ava 2 s. c o m * Returns a pseudorandom integer sampled uniformly from {0, ..., n-1} Assumes * n > 0 */ public static int randInt(int n) { return rand.nextInt(n); } }