title: Generating a number between 1 and 2 java Math.random()
body: <p>I'm working on creating a range of numbers between 1 and 2 using the imported math.random() class.</p>
  
  <p>Here's how I got it working so far, however I can't see how it would work:</p>
  
  <pre><code>int tmp = (int)(Math.random()*1)+1;
  </code></pre>
  
  <p>Anyonould?e know if that actually works to get the range? if not.. then what</p>
  
  <p>EDIT: Looking for either the number 1 or 2. </p>