I am trying to use a new stream function to expand a list of strings into a longer list.
segments = segments.stream()
.map(x -> x.split("-"))
.collect(Collectors.toList());
This, however, gives a List<String[]>(), which of course will not compile. How to reduce the final stream in one list?
source
share