How can I generate random number in specific range in Android?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/363681/java-generating-random-number-in-a-range">Java: generating random number in a range</a>  </p>
</blockquote>



<p>Hello everyone,</p>

<p>I want to generate random no. in a specific range for use in my android application. (Ex. Range Between 65 to 80)</p>

<p>I try as per below code, but it is not very use full. It also returns the value greater then max. value(greater then 80). </p>

<pre><code>Random r=new Random();
int i1=(r.nextInt(80) +65);
</code></pre>

<p>Anyone have idea How I can generate random number in between range. </p>
