Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stream get list of one field

List<String> names = 
    personList.stream()
              .map(Person::getName)
              .collect(Collectors.toList());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #stream #list #field
ADD COMMENT
Topic
Name
8+2 =