Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

find namestart with name using strim in java

public static void main(String[] args) {
 List<String> names = Arrays.asList("Ava", "Alberto", "Sarah", "Sam", "Smith");
 Stream<String> namesStartsWith = names.stream().filter(s -> s.startsWith("S"));
 System.out.println(namesStartsWith.collect(Collectors.toList()));
}
Source by www.digitizedpost.com #
 
PREVIOUS NEXT
Tagged: #find #namestart #strim #java
ADD COMMENT
Topic
Name
1+5 =