Here you can find the source of getRandomIntNum(int limit)
private static int getRandomIntNum(int limit)
//package com.java2s; import java.util.Random; public class Main { private static Random rm = new Random(); private static int getRandomIntNum(int limit) { return rm.nextInt(limit); }//from w w w.j a v a 2 s .co m }