list筛选某个字段作为list返回Lambda方式
1、创建Student类作为测试对象集合

2、创建Test测试类进行测试筛选某个字段作为list返回List<Integer> ages = studentList.str髫潋啜缅eam() .map(student->student.getAge()) .collect(Collectors.toList());

3、输出结果

4、太简单啦😏
1、创建Student类作为测试对象集合
2、创建Test测试类进行测试筛选某个字段作为list返回List<Integer> ages = studentList.str髫潋啜缅eam() .map(student->student.getAge()) .collect(Collectors.toList());
3、输出结果
4、太简单啦😏