Java Random Number getRandomNum()

Here you can find the source of getRandomNum()

Description

Return a random long number.

License

Open Source License

Return

long - Long random integer generated.

Declaration

public static long getRandomNum() 

Method Source Code


//package com.java2s;
/*/*  w  w  w  .  j a v  a  2s  .co  m*/
 * This file is part of the DITA Open Toolkit project.
 * See the accompanying license.txt file for applicable licenses.
 */

import java.util.Random;

public class Main {
    /**
     * Return a random long number.
     * @return long -
     *             Long random integer generated.
     */
    public static long getRandomNum() {
        final Random generator = new Random();
        return generator.nextLong();
    }
}

Related

  1. getRandNumber(int maxNumber)
  2. getRandomDouble(double max, String decimalFormat)
  3. getRandomNum()
  4. getRandomNum()
  5. getRandomNum()
  6. getRandomNum(double pSngBegin, double pSngEnd)
  7. getRandomNum(int len)
  8. getRandomNum(int pwd_len)
  9. getRandomNumAndLetterAF(int len)