Check out example codes for "java obtain list string from list object". It will help you in understanding the concepts better.

Code Example 1

List<String> ids = 
  foos.stream().map(foo -> foo.getId()).collect(Collectors.toList());

Learn ReactJs, React Native from akashmittal.com