A

Admin • 833.24K Points
Coach

Q. Which method adds an element to the queue and returns false if full?

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

Explanation by: Admin

`offer()` is a non-throwing version of add() and returns false if the queue is full.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.