java 8 merge multiple collections using flatmap

Solutions on MaxInterview for java 8 merge multiple collections using flatmap by the best coders in the world

showing results for - "java 8 merge multiple collections using flatmap"
Raylan
13 Jun 2016
1Stream<String> combinedStream = Stream.of(collectionA, collectionB)
2  .flatMap(Collection::stream);
3Collection<String> collectionCombined = 
4  combinedStream.collect(Collectors.toList());
similar questions