How to specify ranges to java.util.Random? : <p>I don't know why Java's designers didn't design java.util.Random objects to return random numbers like this: </p>

<p><code>rand.nextInt(minValue, maxValue);</code></p>

<p>I don't understand how to pass min and max values to this function. I've seen this recommended:</p>

<p><code>random.nextInt(max + 1 - (min)) + min</code></p>

<p>but what does that mean? Does that mean: </p>

<p><code>random.nextInt(FULL_RANGE + 1) + START_OF_RANGE</code></p>

<p>For example, if I wanted to generate values between -1 and 1, inclusive, is this how I do it:</p>

<p><code>int oneOfThreeChoices = rand.nextInt(1 + 1 + 1) - 1;</code></p>
