Java Random Number getRandomNumberFixLength()

Here you can find the source of getRandomNumberFixLength()

Description

get Random Number Fix Length

License

Open Source License

Declaration

public static long getRandomNumberFixLength() 

Method Source Code


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

import java.util.Random;

public class Main {
    static Random generator = new Random(System.currentTimeMillis());

    public static long getRandomNumberFixLength() {

        return 1000000000L + generator.nextInt(2000000000);
    }/*from  ww w.ja v a 2 s  .c o m*/
}

Related

  1. getRandomNumber(int max, int count)
  2. getRandomNumber(int num)
  3. getRandomNumber(int randomCount)
  4. getRandomNumber(int startNumber, int endNumber)
  5. getRandomNumberBetween(int min, int max)
  6. getRandomNumberGenerator()
  7. getRandomNumberInRange(Random random, int min, int max)
  8. getRandomNumbers(int range, int count, Random rnd)
  9. getRandomNumberString(int length)