title: How can I prevent a random number generator from repeating numbers?
body: <p>How can I prevent a random number generator from repeating numbers?</p>
  
  <p>Here's the part of my code that generates the random numbers:</p>
  
  <pre><code>String [] number = {"1","2","3","4","5","6"};
  Random random = new Random();
  int Select = random.nextInt(number.length);
  System.out.println(number[Select]);
  </code></pre>
  
  <p>Sometimes it repeats numbers, like "4", and then "4" again. I'd like it to be always a different number.</p>