Java Random Int getRandomIntBetween(int low, int high)

Here you can find the source of getRandomIntBetween(int low, int high)

Description

get Random Int Between

License

Open Source License

Declaration

public static Integer getRandomIntBetween(int low, int high) 

Method Source Code

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

import java.util.Random;

public class Main {
    public static Integer getRandomIntBetween(int low, int high) {
        return new Random().nextInt(high - low) + low;
    }//  ww  w  . j a  va2s .c o m
}

Related

  1. getRandomInt(int minimum, int maximum)
  2. getRandomInt(int sek, int min, int max)
  3. getRandomInt(int size)
  4. getRandomInt(Random rand, int lower, int upper)
  5. getRandomInt(String level)
  6. getRandomIntBetween(int mi, int ma)
  7. getRandomInteger(int aStart, int aEnd)
  8. getRandomInteger(int min, int max)
  9. getRandomIntegerArray(Random rand, int size, int range)