forEach(System.out::println)用法
等同于增强foreach
@SpringBootTest
class MybatisPlusApplicationTests {
@Autowired
private UserMapper userMapper;
@Test
void contextLoads() {
List
// users.forEach(System.out::println);
for (User user : users) {
System.out.println(user);
}
}
}
运行结果
共有 0 条评论