98-hands-on

1. 函数对象

image-20240415205750369
  • 生成匿名类的对象名
image-20240415210112103

1. 方法引用

image-20240416092251211

2. Collection抽取一个字段

Stream<Ooxx> ooxxStream = Stream.of(new Ooxx(), new Ooxx(), new Ooxx());
Set<Integer> ids = ooxxStream.map(Ooxx::getId).collect(Collectors.toSet());