A

Admin • 828.03K Points
Coach

Q. Which method adds an element to the queue and throws an exception if full?

  • (A) add()
  • (B) offer()
  • (C) push()
  • (D) put()
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
`add()` throws an IllegalStateException if the queue is full.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.