Java List Select Field

[Solved] Java List Select Field | Scala - Code Explorer | yomemimo.com
Question : java list select field

Answered by : fatih-karazm

import java.util.stream.Collectors;
List<String> field1List = entities.stream().map(YourEntity::getField1).collect(Collectors.toList());

Source : https://stackoverflow.com/questions/10997139/how-to-get-a-list-of-specific-fields-values-from-objects-stored-in-a-list | Last Update : Fri, 27 May 22

Answers related to java list select field

Code Explorer Popular Question For Scala