Here you can find the source of getRandomBoundedInt(int bound)
Parameter | Description |
---|---|
bound | a parameter |
public static int getRandomBoundedInt(int bound)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ThreadLocalRandom; public class Main { /**//from w w w. j a va2 s . c o m * bound is exclusive * * @param bound * @return */ public static int getRandomBoundedInt(int bound) { return ThreadLocalRandom.current().nextInt(bound); } }