Java Queue

Java Collections

Java ArrayDeque with Examples

Learn about Java ArrayDeque and its features with practical examples. Learn to use it as Stack and Queue, and the difference from LinkedList.

Java SynchronousQueue with Example

Java SynchronousQueue is a specific type of BlockingQueue with no internal capacity and is primarily used in exchanging data between two threads.

Java TransferQueue Vs. LinkedTransferQueue

In Java, the TransferQueue interface is a concurrent BlockingQueue implementation with support to support “synchronous message passing” between producers and consumers. The key feature of TransferQueue is the transfer() method that blocks until the message is handed off to a consumer. 1. TransferQueue Interface The TransferQueue is an interface in …

ConcurrentLinkedDeque Example – Non-blocking Thread-safe List

In java, most used data structure is probably a list. A list has an undetermined number of elements and you can add, read, or remove the element of any position. Additionally, concurrent lists allow the various threads to add or remove elements in the list at a time without producing …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.