A

Admin • 830.13K Points
Coach

Q. Which method throws an exception if the element can't be added?

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

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.