title: incompatible types: int[] cannot be converted to java.util.List<java.lang.Integer>
body: <p>I have a function that generates random arrays:</p>
  
  <pre><code>  private static List&lt;Integer&gt; randomIntegerArray(int n) {
      int[] array = new int[n];
      for(int i = 0; i &lt;  array.length; i++) {
        array[i] = (int)Math.random();
      }
      return array;
    }
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <blockquote>
    <p>incompatible types: int[] cannot be converted to java.util.List</p>
  </blockquote>
  
  <p>I'm not sure what the issue is here.  This is an incredibly simple bit of code that I can't seem to get to work. </p>