Znajdź Namestart z nazwą za pomocą Strim w Javie
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()));
}
Dipak Jagdale