Java Random getRandom(int min, int max)

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

Description

get Random

License

Open Source License

Declaration

public static int getRandom(int min, int max) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    public static int getRandom(int min, int max) {
        return new Random().nextInt(max - min) + min;
    }/*from w  w  w  .  j av  a2s  .c o m*/
}

Related

  1. getRandom()
  2. getRandom()
  3. getRandom()
  4. getRandom(Collection collection)
  5. getRandom(int i)
  6. getRandomDigits(Random r, int l, int radix)
  7. getRandomElement(T[] items)
  8. getRandomFileName()
  9. getRandomFloat()