Published
- 1 min read
java list addAll stream() filtereted
The solution for this is noted below
java list addAll stream() filtereted
Solution
List<Person> beerDrinkers = persons.stream()
.filter(p -> p.getAge() > 16).collect(Collectors.toList());
Try other methods by searching on the site. That is if this doesn’t work