Java Random Int randomNumber(int lower, int upper)

Here you can find the source of randomNumber(int lower, int upper)

Description

random Number

License

Open Source License

Declaration

public static int randomNumber(int lower, int upper) 

Method Source Code

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

public class Main {
    public static int randomNumber(int lower, int upper) {
        return lower + (int) (Math.random() * ((upper - lower) + 1));
    }//from w w  w  . ja  va  2 s.c  om
}

Related

  1. randomKey(int sLen)
  2. randomMatrix(int x, int y)
  3. randomModuleName(int count)
  4. randomNum(int n)
  5. randomNum(int number)
  6. randomNumber(int lower_bound, int higher_bound)
  7. randomNumber(int min, int max)
  8. randomNumber(int minimum, int maximum)
  9. randomNumberBetweenIntervals(int min, int max)