Skip to content

Tag Archives: java-queue

The queue is a linear data structure that follows the FIFO rule (first in first out). We can implement Queue for not only Integers but… Read More
The TransferQueue interface is a member of the Java Collections Framework. It was introduced in JDK 1.7, it belongs to java.util.concurrent package. The TransferQueue is… Read More
Data structure is a way of storing and organising data efficiently such that the required operations on them can be performed efficiently with respect to… Read More
The offer(E e) method of Queue Interface inserts the specified element into this queue if it is possible to do so immediately without violating capacity… Read More
The add(E e) method of Queue Interface inserts the element passed in the parameter to the end of the queue if there is space. If… Read More
The remove() method of Queue Interface returns and removes the element at the front the container. It deletes the head of the container. The method… Read More
The offer() method of ConcurrentLinkedQueue is used to insert the element, passed as parameter, at the tail of this ConcurrentLinkedQueue. This method returns True if… Read More
The peek() method of ConcurrentLinkedQueue is used to return the head of the ConcurrentLinkedQueue. It retrieves but does not remove, the head of this ConcurrentLinkedQueue.… Read More
The peek() method of Queue Interface returns the element at the front the container. It does not deletes the element in the container. This method… Read More
The isEmpty() method of ConcurrentLinkedQueue is used to check if this queue is empty or not. It returns true if ConcurrentLinkedQueue contains zero number of… Read More
The poll() method of ConcurrentLinkedQueue is used to remove and return the head of this ConcurrentLinkedQueue. If the ConcurrentLinkedQueue is empty then this method will… Read More
The element() method of Queue Interface returns the element at the front the container. It does not deletes the element in the container. This method… Read More
The add() method of ConcurrentLinkedQueue is used to insert the element, passed as parameter to add() of ConcurrentLinkedQueue, at the tail of this ConcurrentLinkedQueue. This… Read More
The poll() method of Queue Interface returns and removes the element at the front the container. It deletes the element in the container. The method… Read More
The iterator() method of ConcurrentLinkedQueue is used to returns an iterator of the same elements as this ConcurrentLinkedQueue in a proper sequence. The elements returned… Read More