Which method is used to remove all elements from a collection?

  1. removeAll()
  2. clear()
  3. deleteAll()
  4. flush()
Correct answer clear()

Explanation

`clear()` removes all elements from a collection.

Update: Admin added a tag on this question

Topics

By Admin · · 34 views