A

Admin • 828.43K Points
Coach

Q. What does `offer(e, timeout, unit)` do in a BlockingQueue?

  • (A) Adds an element if possible, waiting up to timeout
  • (B) Always adds the element
  • (C) Throws exception if full
  • (D) Blocks indefinitely
  • Correct Answer - Option(A)
  • Views: 15
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
`offer(e, timeout, unit)` attempts to insert and waits for available space.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.