Java ThreadLocalRandom getInt(int bound)

Here you can find the source of getInt(int bound)

Description

get Int

License

Apache License

Declaration

public static int getInt(int bound) 

Method Source Code

//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;
    }
}

Related

  1. generateStringFromCharacters(final Random random, final char[] validChars, final int min, final int max)
  2. genRandomString()
  3. get_a_number_between_min_and_max(int min, int max)
  4. getBoolean()
  5. getElement(boolean[] array)
  6. getLetter()
  7. getRandom()
  8. getRandom(int p)
  9. getRandom8()