Here you can find the source of getInt(int bound)
public static int getInt(int bound)
//package com.java2s; //License from project: Apache License import java.util.concurrent.ThreadLocalRandom; public class Main { public static int getInt() { return ThreadLocalRandom.current().nextInt(); }/*from w w w .jav a 2 s . com*/ public static int getInt(int bound) { return ThreadLocalRandom.current().nextInt(bound); } public static int getInt(int min, int max) { return getInt(max + 1 - min) + min; } }