Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 8 find in list

List<String> ss = Arrays.asList({"one", "two", "four"});
String s = ss.stream()
  .filter(x -> "two".equals(x))
  .findAny()
  .orElse(null);
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #java #find #list
ADD COMMENT
Topic
Name
7+4 =