Java Random Number getRandNumber(int maxNumber)

Here you can find the source of getRandNumber(int maxNumber)

Description

get Rand Number

License

Apache License

Declaration

public static int getRandNumber(int maxNumber) 

Method Source Code


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

import java.util.Random;

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

    public static int getRandNumber(int maxNumber) {
        return rand.nextInt(maxNumber);
    }//from ww w .j  a  v a2  s .com
}

Related

  1. getPhoneNumber()
  2. getPositiveNumber(int maximum)
  3. getRandNum(int charCount)
  4. getRandNum(int num)
  5. getRandNum(int num)
  6. getRandomDouble(double max, String decimalFormat)
  7. getRandomNum()
  8. getRandomNum()
  9. getRandomNum()