exam questions

Exam 1z0-809 All Questions

View all questions & answers for the 1z0-809 exam

Exam 1z0-809 topic 1 question 110 discussion

Actual exam question from Oracle's 1z0-809
Question #: 110
Topic #: 1
[All 1z0-809 Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Sigamani
Highly Voted 3 years, 2 months ago
B is correct. predicate accepts one parameter and returns boolean value
upvoted 9 times
...
JME_CHG
Highly Voted 3 years, 4 months ago
B, return is boolean, and takes 1 argument...
upvoted 7 times
...
shivkumarx
Most Recent 3 months, 1 week ago
Selected Answer: B
It is predicate, we can replace the annoymous local class with a Predicate implementation: Predicate<String> checkLength = str -> str.length()>5 && str.length()<10; boolean res = checkLength("Hello");
upvoted 1 times
...
asdfjhfgjuaDCV
4 months, 1 week ago
B is the correct answer
upvoted 1 times
...
steefaand
5 months, 1 week ago
Selected Answer: B
B is correct as Predicate accepts one argument and returns boolean.
upvoted 1 times
...
MatthewTannous
1 year, 11 months ago
Selected Answer: B
B because predicates return a boolean value
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago