Here you can find the source of randInt(int l)
public static int randInt(int l)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static Random random = new Random(); public static double randInt(int min, int max) { return (min + (Math.random() * (max - min + 1))); }/* w ww.java 2 s.c o m*/ public static int randInt(int l) { return random.nextInt(l); } public static int randInt() { return random.nextInt(); } }