title: How to get a random between 1 - 100 from randDouble in Java?
body: <p>Okay, I'm still fairly new to Java. We've been given an assisgnment to create a game where you have to guess a random integer that the computer had generated. The problem is that our lecturer is insisting that we use:</p>
  
  <pre><code>double randNumber = Math.random();
  </code></pre>
  
  <p>And then translate that into an random integer that accepts 1 - 100 inclusive. I'm a bit at a loss. What I have so far is this:</p>
  
  <pre><code>//Create random number 0 - 99
  double randNumber = Math.random();
  d = randNumber * 100;
  
  //Type cast double to int
  int randomInt = (int)d;
  </code></pre>
  
  <p>However, the random the lingering problem of the random double is that 0 is a possibility while 100 is not. I want to alter that so that 0 is not a possible answer and 100 is. Help? </p>