java list addAll stream() filtereted

52

java list addAll stream() filtereted -

List<Person> beerDrinkers = persons.stream()
    .filter(p -> p.getAge() > 16).collect(Collectors.toList());

Comments

Submit
0 Comments