这是代码sinplet:
Excel excel = new Excel();
ArrayList 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);
这是错误消息:
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)
06001
基元和泛型不匹配.你需要一个Integer []而不是int [].