title: Generate Random Integer from Min to Max?
body: <p>I want to generate a random Integer that is:</p>
  
  <ol>
  <li>Inside the range [Min, Max] <code>inclusive</code></li>
  <li>The range can be [5,20], [-29, -3] or [-13, 13] (It can be in any range, positive or negative or in between)</li>
  <li>The code is working fine in Android</li>
  </ol>
  
  <p>What I got so far is this, but it seems not working with negative ranges !</p>
  
  <pre><code>1 + (int)(Math.random() * ((Max - Min) + 1));
  </code></pre>