students.forEach(vo -> { if(vo.getRemark()==null||("").equals(vo.getRemark())){ vo.setRemark("B"); }else { vo.setRemark("C"); } }); --------------------------------------------------------- students.forEach(vo -> { System.out.println(vo.getRemark()); });
List对象foreach用法
最新推荐文章于 2024-05-28 17:46:22 发布