title: Select a random int that doesn't exist
body: <p>I am doing something where I have to choose a couple random numbers, without choosing the same number again. I have tried many ways, but they will not work. I checked if the random number exists in my int[], and reset the int to another random, but what is that other random also exists, I tried fixing that but I ran into problems.</p>
  
  <p>Here's my current code:</p>
  
  <pre><code>p.sendMessage("debug over max");
          Random r = new Random();
          for (int i=0;i&lt;max + 1;i++) {
              int ran = r.nextInt(arenaAmount);
              if (ran == 0) ran = 1;
              arenas[i] = ran;
          }
  </code></pre>
  
  <p>Thats what I have so far,
  so how can I make sure it doesn't have the same number. If there is another thread already please link me to it.</p>
  
  <p>Thanks, Joey.</p>