title: Modify duplicating random number generator to non-duplicating random number generator
body: <pre><code>int size = 5;
  
  int[] list = new int[size];
  
  Random rand = new Random();
  for(int i = 0; i &lt; size; i++)
  {
     list[i] = rand.nextInt(100);            
  }
  
  for(int element : list)
     System.out.print(element + " ");
  </code></pre>
  
  <p>I'm trying to modify this random number generator so that it will not duplicate random generated numbers. How can I accomplish this? Thanks for your help.</p>