A

Admin • 825.56K Points
Coach

Q. Which functional interface should be used to replace a for-each loop with a lambda?

  • (A) Function
  • (B) Predicate
  • (C) Consumer
  • (D) Supplier

Explanation by: Admin
Consumer is used to perform an action on each element, similar to for-each.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.