Java ThreadLocalRandom createNewPin()

Here you can find the source of createNewPin()

Description

create New Pin

License

Open Source License

Declaration

public static int createNewPin() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static int createNewPin() {

        // nextInt is normally exclusive of the top value,
        // so add 1 to make it inclusive
        int randomNum = ThreadLocalRandom.current().nextInt(1, 10000);
        return randomNum;
    }/* ww  w . j  a v a 2 s . c  o  m*/
}

Related

  1. base62Random()
  2. createRandom(int number)
  3. createRandomName()
  4. createRandomNumbers(int length)
  5. generateDescription()