R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which stream method checks if all elements satisfy a condition?

  • (A) anyMatch()
  • (B) allMatch()
  • (C) noneMatch()
  • (D) matchAll()
  • Correct Answer - Option(B)
  • Views: 8
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`allMatch()` returns true if all elements match the given predicate.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.