Dequeue Interface

suggest change


[{“Name”:“Java SE 6”,“GroupName”:null},{“Name”:“Java SE 7”,“GroupName”:null},{“Name”:“Java SE 8”,“GroupName”:null},{“Name”:“Java SE 9 (Early Access)”,“GroupName”:null}]


A Deque is linear collection that supports element insertion and removal at both ends.

The name deque is short for “double ended queue” and is usually pronounced “deck”.

Most Deque implementations place no fixed limits on the number of elements they may contain, but this interface supports capacity-restricted deques as well as those with no fixed size limit.

The Deque interface is a richer abstract data type than both Stack and Queue because it implements both stacks and queues at same time


Generics can be used with Deque.

Deque<Object> deque = new LinkedList<Object>();

When a deque is used as a queue, FIFO (First-In-First-Out) behavior results.

Deques can also be used as LIFO (Last-In-First-Out) stacks.

For more information about methods, go through this Documentation.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents