How to use Java's ConcurrentLinkedQueue? How does it work? What are its characteristics? When should you use it?
How to use Java's BlockingQueue interface? What methods does it provide? What are blocking, unblocking, bounded, and unbounded queues?
How to create and use a queue in Java? What methods does the Queue interface offer? Which queues exist in the JDK? With sample code!
In this tutorial, you will learn everything about the abstract data type "Queue", enqueue and dequeue operations, using illustrative Java examples.
Java 18 Features (with Examples)
The new Java 18 features with examples: UTF-8 encoding by default, @snippet tag in JavaDoc, jwebserver, Internet-address resolution SPI + more…
How to reverse the order of the elements in a stack using recursion (i.e., without iteration)? Tutorial with images and Java code examples.
How to implement a stack with a queue (better said: with two queues)? Tutorial with images and Java code examples.
How to implement a stack using a linked list? What are the advantages and disadvantages? Tutorial with images and Java code examples.
How to implement a stack based on an array in Java (without Java Collections classes)? How do you make the array grow on demand?
In this tutorial, you will learn how to implement a stack in Java - with an ArrayDeque, an Array, a LinkedList and a Queue.