Check out example codes for "java 8 collect multiple lists into single list". It will help you in understanding the concepts better.

Code Example 1

List<MyObject> list = services.stream()
                              .flatMap(s -> s.getObjects().stream())
                              .collect(Collectors.toList());

Learn ReactJs, React Native from akashmittal.com