JAVA 泛型无法转换问题
List resultList=new ArrayList();
?
?List returnList=new ArrayList();//
?
?for(int i=0;i< goodsList.size();i++)
{ int num=0;
? Goods g=(Goods)goodsList.get(i);
?resultList.add(g);
}
?
?for(int k=0;k<10;k++ )
?
{
returnList.add(resultList.get(k)); //报错?????
?}