Page 1 of 1

About Question enthuware.ocpjp.v8.2.1756 :

Posted: Sat Jan 20, 2018 5:09 pm
by frakcio
The question is 'Which interface from java.util.function package can be used to refactor this code?'. For me, option b - Function works fine..

Code: Select all

Function<Double, Boolean> tt = d -> d >= 0.0;
isOK = tt.apply(bal);

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

Posted: Sat Jan 20, 2018 10:33 pm
by admin
The "can be" is from the perspective of the exam :)
Since you need to select only option, you should select the best option. And in our opinion, Predicate is the best option based on the given requirement.