title: Error: Generic Array Creation
body: <p>I don't understand the error of Generic Array Creation.<br>
  First I tried the following:<br></p>
  
  <pre><code>  public PCB[] getAll() {
         PCB[] res = new PCB[list.size()];
             for (int i = 0; i &lt; res.length; i++) {
                 res[i] = list.get(i);
              }
         list.clear();
         return res;
  }
  </code></pre>
  
  <p><br>
  Then I tried doing this:</p>
  
  <pre><code>PCB[] res = new PCB[100];
  </code></pre>
  
  <p><br>
  I must be missing something cause that seems right. I tried looking it up I really did. And nothing is clicking. </p>
  
  <p><br>
  My question is: What can I do to fix this?</p>
  
  <p><br>
  the error is :<br> </p>
  
  <pre><code>.\Queue.java:26: generic array creation
  PCB[] res = new PCB[200];
              ^
  Note: U:\Senior Year\CS451- file      
  uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  1 error
  </code></pre>
  
  <p>Tool completed with exit code 1</p>