A

Admin • 825.56K Points
Coach

Q. Which method is used to remove all elements that satisfy a given condition?

  • (A) remove()
  • (B) clear()
  • (C) removeIf()
  • (D) deleteWhere()
  • Correct Answer - Option(C)
  • Views: 5
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
`removeIf()` removes elements that match a given Predicate condition.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.