Google News
logo
Java Collections - Interview Questions
What do you understand by BlockingQueue?
BlockingQueue is an interface which extends the Queue interface. It provides concurrency in the operations like retrieval, insertion, deletion. While retrieval of any element, it waits for the queue to be non-empty. While storing the elements, it waits for the available space. BlockingQueue cannot contain null elements, and implementation of BlockingQueue is thread-safe.
 
Syntax :
public interface BlockingQueue<E> extends Queue <E>
Advertisement