A

Admin • 828.03K Points
Coach

Q. What happens when you call `remove()` on an empty queue?

  • (A) Returns null
  • (B) Throws NoSuchElementException
  • (C) Throws NullPointerException
  • (D) Does nothing

Explanation by: Admin
`remove()` throws NoSuchElementException if the queue is empty.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.