A

Admin • 828.43K Points
Coach

Q. Which method retrieves and removes the head of the queue?

  • (A) peek()
  • (B) poll()
  • (C) top()
  • (D) get()
  • Correct Answer - Option(B)
  • Views: 16
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
The `poll()` method retrieves and removes the head of the queue, returning null if empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.