title: Checking if an array contains certain integers
body: <p>I am making an Array that is 10 integers long, so that each place 0-9 contains a different integer 0-9. </p>
  
  <p>I am having trouble figuring out how to check if the array already contains a certain number, and if so, regenerating a new one. </p>
  
  <p>So far I have:</p>
  
  <pre><code>for (int i = 0; i &lt; perm.length; i++)
  {
      int num = (int) (Math.random() * 9); 
      int []
  
      perm[i] = num;   
  }
  </code></pre>