Java Random Number getRandomNumber()

Here you can find the source of getRandomNumber()

Description

get Random Number

License

Apache License

Declaration

public static String getRandomNumber() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Random;

public class Main {
    public static String getRandomNumber() {
        Random random = new Random();
        long n = (long) (100000L + random.nextFloat() * 900000L);
        return new Long(n).toString();
    }/*from   www.  j a  va 2  s. c  om*/
}

Related

  1. getRandomNumAndLetterAF(int len)
  2. getRandomNumAndStr(int length)
  3. getRandomNumber()
  4. getRandomNumber()
  5. getRandomNumber()
  6. getRandomNumber()
  7. getRandomNumber(final int from, final int to)
  8. getRandomNumber(final int maxInt, final int minInt)
  9. getRandomNumber(int bit)