A

Admin • 828.03K Points
Coach

Q. Which method is used to remove all elements from a queue?

  • (A) removeAll()
  • (B) clear()
  • (C) flush()
  • (D) empty()
  • Correct Answer - Option(B)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
`clear()` is used to remove all elements from the queue.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.