A

Admin • 833K Points
Coach

Q. Which exception is thrown by `add()` if the queue is full?

  • (A) IllegalStateException
  • (B) NullPointerException
  • (C) QueueOverflowException
  • (D) IllegalArgumentException
  • Correct Answer - Option(A)
  • Views: 27
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin

`add()` throws IllegalStateException if the queue has reached its capacity.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.