Java Random Number generateRandomNum(int passNumber)

Here you can find the source of generateRandomNum(int passNumber)

Description

generate Random Num

License

Open Source License

Declaration

private static int generateRandomNum(int passNumber) 

Method Source Code

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

import java.util.Random;

public class Main {
    private static int randomNum;
    private static Random rn = new Random();

    private static int generateRandomNum(int passNumber) {

        int range = passNumber + 1;
        randomNum = rn.nextInt(range);//from  w  w w  . j  a v  a2  s. com
        return randomNum;
    }
}

Related

  1. createRandomHexNumber(int length)
  2. createRandomNumber()
  3. createRandomNumber(int index)
  4. distinctInts(int from, int to, int number)
  5. generateRandomNum(int i)
  6. generateRandomNumb(int randomSize, int range)
  7. generateRandomNumber()
  8. generateRandomnumber(int firstNum, int restNum)
  9. generateRandomNumber(int from, int to)