Returns a stream consisting of the contents of each element of this stream replaced with the contents of a mapped stream (obtained by applying the specified mapping function to each element).
It is processed by the following procedure
abcde
Is output
Arrays.asList("a,b,c", "d,e")
.flatMap(str -> Arrays.stream(str.split(','))
.forEach(str -> System.out.print(str));
`Stream <List <List <String >>`
is created from a double list, the argument of the mapping function (str in the above example) will be List, but it does not have to be List.Recommended Posts