Java Random Number randomNumber(int min, int max, Random r)

Here you can find the source of randomNumber(int min, int max, Random r)

Description

random Number

License

Open Source License

Declaration

public static int randomNumber(int min, int max, Random r) 

Method Source Code

//package com.java2s;
//License from project: GNU General Public License 

import java.util.*;

public class Main {
    public static int randomNumber(int min, int max, Random r) {
        return (int) (r.nextDouble() * (max - min + 1) + min);
    }/*  w ww  . ja  va 2s.  co m*/
}

Related

  1. getRndNumByLen(int lengthOfNumber)
  2. getSerialNumber(int length)
  3. getTenByteNumber()
  4. randomHexNumber(final int length)
  5. randomNumber(int length)
  6. randperm(int number)