Код: Выделить всё
List.of("a","b","c","D").stream()
.map(m -> {
System.out.println(m);
return m;
})
.count();
Код: Выделить всё
List.of("a","b","c","D").stream()
.filter(f -> f.matches("[a-z]"))
.map(m -> {
System.out.println(m);
return m;
})
.count();
Подробнее здесь: https://stackoverflow.com/questions/792 ... evaluation
Мобильная версия