Java Random Int random(int lowerBound, int upperBound)

Here you can find the source of random(int lowerBound, int upperBound)

Description

random

License

Open Source License

Declaration

private static int random(int lowerBound, int upperBound) 

Method Source Code

//package com.java2s;

public class Main {
    private static int random(int lowerBound, int upperBound) {
        return (lowerBound + (int) Math.round(Math.random() * (upperBound - lowerBound)));
    }//from   w  w w  . j  a v a2 s . com
}

Related

  1. random(int length)
  2. random(int length, String data)
  3. random(int limit)
  4. random(int lo, int hi)
  5. Random(int low, int high)
  6. random(int maxValue)
  7. random(int min, int max)
  8. random(int min, int max)
  9. random(int min, int max)