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

  1. remove()
  2. clear()
  3. removeIf()
  4. deleteWhere()
Correct answer removeIf()

Explanation

`removeIf()` removes elements that match a given Predicate condition.

Update: Admin added a tag on this question

Topics

By Admin · · 27 views