A

Admin • 828.03K Points
Coach

Q. Which method is preferred over `add()` to avoid exceptions when inserting?

  • (A) put()
  • (B) offer()
  • (C) enqueue()
  • (D) insert()

Explanation by: Admin
`offer()` returns false instead of throwing 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.