Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java find item in list by property

Customer james = customers.stream()
  .filter(customer -> "James".equals(customer.getName()))
  .findAny()
  .orElse(null);
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #java #find #item #list #property
ADD COMMENT
Topic
Name
4+2 =