Java Deque via LinkedList

adding Elements on Both End of LinkedList Deque

The Java Deque (Double-Ended-Queue) interface extends the Queue interface and Java’s LinkedList implements Deque interface. In the past coding examples, we used the LinkedList as queue via the Java Queue Interface. In this example, we will use our LinkedList using the Deque Interface. Unlike queue, we can add and remove items from both ends of the LinkedList via Java Deque Interface. The Deque is also called as ‘Deck’.

Read More