title: How to make not generate a number twice?
body: <p>In my program i am using a random generator.</p>
  
  <pre><code>Random random = new Random();
  
  //How i use it
  int i = random.nextInt(numberNeeded);
  </code></pre>
  
  <p>The problem is, is that i need to find a way that each number only gets generated once. So i guess its not complete random....For example....When number 1 is generated, i dont want it to be called again, but instead call one of the other numbers...Like 2,3, or 4...Then when 4 is call it only can call 2 or 3..</p>
  
  <p>then the next time the numbers get shuffled and then it repeats the process...</p>
  
  <p>The numbers will need to range from 4 to 16</p>