Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java stream get list of one field

List<String> names = 
    personList.stream()
              .map(Person::getName)
              .collect(Collectors.toList());
Comment

PREVIOUS NEXT
Code Example
Java :: Exception in thread "main" java.util.zip.ZipException: error 
Java :: android studio change menu title 
Java :: regex pattern for date validation 
Java :: math library java 
Java :: android studio proportional width 
Java :: select photo from camera android 
Java :: android studio breakpoint not working 
Java :: int to byte 
Java :: change image on button click android studio 
Java :: java put a char array into a string 
Java :: replace substring at index java 
Java :: who created java 
Java :: java thread dump 
Java :: java quotes in string 
Java :: java create map 
Java :: set ImageView size programmatically android 
Java :: android studio create a Uri 
Java :: java.math.biginteger cannot be cast to java.lang.long 
Java :: array to list java 
Java :: how to remove duplicate elements from char array in java 
Java :: find minimum in rotated sorted array 
Java :: compare two times in java 
Java :: java nested loop 
Java :: unique elements in array java 
Java :: java call method from another class example 
Java :: java print statement 
Java :: java delete column from csv 
Java :: java iterator to stream 
Java :: send action bar message bukkit 
Java :: java throw keyword 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =