Answers for "how to get list of string from list of object in java 8"

1

java obtain list string from list object

List<String> ids = 
  foos.stream().map(foo -> foo.getId()).collect(Collectors.toList());
Posted by: Guest on April-06-2020

Code answers related to "how to get list of string from list of object in java 8"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language