pojo对象
public class Student{
private String name;
private int age;
private String sex;
// get set 方法
//toString() 方法
}
处理逻辑
public class ForEachUtils{
public static List<Student> forEach(List<Student> s){
s.forEach(t -> {
t.setSex("男");
});
}
}