0 votes
in JAVA by

Which of the following interfaces represents a function that accepts a boolean-valued argument and produces a result of the specified type in Java 8?

a) Predicate

b) Supplier

c) Function

d) Consumer

1 Answer

0 votes
by
Answer: c) Function.

Explanation: The Function interface represents a function that accepts an argument of one type and produces a result of another type, and has a single abstract method apply() that takes an argument of the specified type and returns a result of the specified type.

Related questions

0 votes
asked May 22, 2022 in JAVA by AdilsonLima
0 votes
asked Aug 22, 2022 in Python by Robindeniel
...