0 votes
in JAVA by

Which of the following is not a functional interface in Java 8?

a) Consumer

b) Supplier

c) Runnable

d) Comparator

1 Answer

0 votes
by

Answer: d) Comparator.

Explanation: Although it is often used with functional programming constructs such as lambda expressions, Comparator is not a functional interface because it has two abstract methods.

Related questions

0 votes
asked Apr 26 in JAVA by SakshiSharma
0 votes
asked Apr 14, 2023 in JAVA by SakshiSharma
...