About Question enthuware.ocpjp.v8.2.1756 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
frakcio
Posts: 4
Joined: Sat Dec 14, 2013 4:15 pm
Contact:

About Question enthuware.ocpjp.v8.2.1756 :

Post 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);

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 36 guests