Page 1 of 1

About Question enthuware.ocpjp.v8.2.1820 :

Posted: Fri Sep 23, 2016 3:58 pm
by supafly
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

Re: About Question enthuware.ocpjp.v8.2.1820 :

Posted: Fri Sep 23, 2016 8:48 pm
by admin
You are right. The order should be reversed. Fixed.
thank you for your feedback!
Paul.