Java Random Number getRandomNumber(int length)

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

Description

get Random Number

License

Open Source License

Declaration

public static int getRandomNumber(int length) 

Method Source Code

//package com.java2s;
import java.util.Random;

public class Main {

    public static int getRandomNumber(int length) {
        Random random = new Random();
        return random.nextInt(length);
    }/*from  w  ww .  j  a  v  a  2 s. c  o  m*/
}

Related

  1. getRandomNumber(int digit)
  2. getRandomNumber(int len)
  3. getRandomNumber(int len)
  4. getRandomNumber(int length)
  5. getRandomNumber(int length)
  6. getRandomNumber(int max, boolean include0)
  7. getRandomNumber(int max, int count)
  8. getRandomNumber(int num)
  9. getRandomNumber(int randomCount)