A

Admin • 832.27K Points
Coach

Q. What does `peek()` return when the queue is empty?

  • (A) null
  • (B) 0
  • (C) throws exception
  • (D) false
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin

`peek()` returns null when the queue is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.