A

Admin • 828.03K Points
Coach

Q. Which method returns but does not remove the head of the queue, or null if empty?

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

Explanation by: Admin
`peek()` is used to examine the head without removing it.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.