A

Admin • 833.24K Points
Coach

Q. Which of the following lambda expressions is valid for a `Predicate<Integer>`?

  • (A) x -> x > 10
  • (B) (x, y) -> x + y
  • (C) () -> true
  • (D) (x) -> x.length()

Explanation by: Admin

A `Predicate<Integer>` requires a single input and returns a boolean.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.