Java Random Int randomInteger(int min, int max)

Here you can find the source of randomInteger(int min, int max)

Description

random Integer

License

Open Source License

Declaration

public static int randomInteger(int min, int max) 

Method Source Code

//package com.java2s;

public class Main {
    public static int randomInteger(int min, int max) {
        return (int) (min + Math.random() * (max - min));
    }/*  ww w . j  a v  a  2s  . c o  m*/
}

Related

  1. randomInt(int mn, int mx)
  2. randomInt(int n)
  3. RandomInteger()
  4. randomInteger(final int upperRange)
  5. randomInteger(int low, int high)
  6. randomIntFromInterval(int min, int max)
  7. randomIntFromRange(int min, int max)
  8. randomIntInInterval(int lower, int upper)
  9. randomIntInRange(int lowerBound, int upperBound)