list of objects to list of strings java 8 code example
Example: java obtain list string from list object
List<String> ids =
foos.stream().map(foo -> foo.getId()).collect(Collectors.toList());
List<String> ids =
foos.stream().map(foo -> foo.getId()).collect(Collectors.toList());