About Question enthuware.ocpjp.v8.2.1820 :
Posted: Fri Sep 23, 2016 3:58 pm
List newList = iList.stream().filter(x->x>3).filter(p).collect(Collectors.toList());
Something is wired in the explanation:
The first filter is x>3. Predicate p is the second filter. Your explanation says that p is the first filter and x>3 is the second filter.
This means first 1, 2 and 3 are out. Next 5 and 7 get filtered.
Cheers
Something is wired in the explanation:
The first filter is x>3. Predicate p is the second filter. Your explanation says that p is the first filter and x>3 is the second filter.
This means first 1, 2 and 3 are out. Next 5 and 7 get filtered.
Cheers