java数据放List前面数据被覆盖
List<Product>proList=pr.getList();List<OnlineApplyProduct>rList=newArrayList<OnlineAp...
List<Product> proList = pr.getList();
List<OnlineApplyProduct> rList=new ArrayList<OnlineApplyProduct>();
for (Product po : proList)
{
OnlineApplyProduct oap=new OnlineApplyProduct();
oap=productService.getVo(po);
rList.add(oap);
}
rList里的数据会被覆盖 展开
List<OnlineApplyProduct> rList=new ArrayList<OnlineApplyProduct>();
for (Product po : proList)
{
OnlineApplyProduct oap=new OnlineApplyProduct();
oap=productService.getVo(po);
rList.add(oap);
}
rList里的数据会被覆盖 展开
2个回答
2014-11-16
展开全部
因为里面的数据是自定义类,所以是会被修改的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询