Here you can find the source of getRandNumber(int maxNumber)
public static int getRandNumber(int maxNumber)
//package com.java2s; //License from project: Apache License import java.util.Random; public class Main { public static Random rand = new Random(System.currentTimeMillis()); public static int getRandNumber(int maxNumber) { return rand.nextInt(maxNumber); }//from ww w .j a v a2 s .com }