A

Admin • 828.43K Points
Coach

Q. Which method only retrieves, but does not remove, the head of the queue?

  • (A) peek()
  • (B) poll()
  • (C) pop()
  • (D) head()
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
The `peek()` method retrieves but does not remove the head of the queue.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.