Question 19
Back to Exercise
What happens when a producer calls put on a full ArrayBlockingQueue?
- A The item is dropped
- B The producer blocks until space becomes available Correct
- C An exception is thrown
- D The queue grows
Correct Answer: Option B
take blocks when the queue is empty; offer/poll have non-blocking and timed variants.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!