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

  • (A) Consumer
  • (B) Supplier
  • (C) Runnable
  • (D) Comparator
πŸ’¬ Discuss
βœ… Correct 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.
Explanation by: Pushkar
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.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
299
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Pushkar
Publisher
πŸ“ˆ
80%
Success Rate