private static List<Integer> filter(List<Integer> list){
    Iterator<Integer> it = list.iterator();
    while(it.hasNext()){
        if(it.next() > 5)
            it.remove();
    }
    return list;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-17
  • 2021-10-05
  • 2022-02-02
  • 2021-10-22
  • 2021-11-25
相关资源
相似解决方案