1z0-809 question 110 discussion

View all Java SE 8 Programmer II Exam here
back to oracle forum

Question 110

Given:

and

Which interface from the java.util.function package should you use to refactor the class Txt?

  • A. Consumer
  • B. Predicate
  • C. Supplier
  • D. Function
Answer:

C


Explanation:
References:

User Votes:
A 1 votes
50%
B 1 votes
50%
C
50%
D
50%
Discussions
0 / 1000
vidhya
6 months, 3 weeks ago

I choose predicate because it takes an argument and returns the boolean.so it perfectly fits this question.