使用场景
适用于嵌套list数据结构,想把内部的list数据合并成一个list.。
举例如下:
public class Test {public static void main(String[] args) {List<List<String>> list new ArrayList<>();List<String> list1 new Arr…
文章目录 官方文档What is flatMap()?Why flat a Stream?Demo需求1:Find all books需求2:Order and LineItems需求3:Splits the line by spaces需求4: flatMap and primitive type 官方文档
https://docs.oracle.com/javase/8/…