Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Product> products = orders.stream()
- .map(order -> order.getProducts())
- .flatMap(List::stream)
- .collect(Collectors.toList());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement