title: Java Generate Random Number Between Two Given Values
body: <p>I would like to know how to generate a random number between two given values.</p>
  
  <p>I am able to generate a random number with the following:</p>
  
  <pre><code>Random r = new Random();
  
  for(int i = 0; i &lt; a.length; i++){
      for(int j = 0; j &lt; a[i].length; j++){
          a[i][j] = r.nextInt();
      }
  
  }
  </code></pre>
  
  <p>However, how can I generate a random number between 0 and 100 (inclusive)?</p>