Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stream find specific element

Customer james = customers.stream()
  .filter(customer -> "James".equals(customer.getName()))
  .findAny()
  .orElse(null);
 
PREVIOUS NEXT
Tagged: #java #stream #find #specific #element
ADD COMMENT
Topic
Name
5+9 =