how to add to a list from another list in jdk 8

前端 未结 0 1818
盖世英雄少女心
盖世英雄少女心 2020-12-21 16:02

I have a the code as below

public void getList(List l){
List newList=new ArrayList();
l.forEach(x-{
Object o=new Object[]{x.getId();}
newList.add(o);
});

sen         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题