title: Arraylist to Array converstion - toArray() function inferred type does not conform to upper bound error
body: <p>This is the code sinplet:</p>
  
  <pre><code>Excel excel = new Excel();
  ArrayList&lt;Integer&gt; a1=excel.readExcelSheet("C:\\Users\\Madhukar\\Desktop\\Employee.xls");
          System.out.println("Using Iterator");
          Iterator iterator = a1.iterator();
          while (iterator.hasNext()) {
         System.out.println(iterator.next());}
          int x=a1.size();
          int[] a3=new int[x];
          a3=a1.toArray(a3);
  </code></pre>
  
  <p>This is the error message:</p>
  
  <blockquote>
    <p>no suitable method found for toArray(int[])
        method AbstractCollection.toArray(T#1[]) is not applicable
          (inferred type does not conform to upper bound(s)
            inferred: int
            upper bound(s): Object)</p>
  
  <pre><code>  where T#1,T#2 are type-variable...
  </code></pre>
  </blockquote>