Java ThreadLocalRandom createRandomNumbers(int length)

Here you can find the source of createRandomNumbers(int length)

Description

create Random Numbers

License

Open Source License

Declaration

public static String createRandomNumbers(int length) 

Method Source Code


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

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static String createRandomNumbers(int length) {
        String numbers = "";

        for (int i = 0; i < length; ++i) {
            int randomNumber = ThreadLocalRandom.current().nextInt(0, 9);
            numbers += Integer.toString(randomNumber);
        }//w  w  w.  j ava  2 s. c o  m

        return numbers;
    }
}

Related

  1. base62Random()
  2. createNewPin()
  3. createRandom(int number)
  4. createRandomName()
  5. generateDescription()
  6. generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit)
  7. generateRandomisedId()
  8. generateRandomSalt(int saltSize)