ArrayDeque class

An ArrayDeque class is comes in the picture when we processed the ability of resizable-array and deque. Also it allows to add or remove the element from both the sides of the queue.

Features of ArrayDeque
1. In ArrayDeque, we can add or remove elements from both sides..
2. ArrayDeque does not aloow null elements.
3. ArrayDeque is not synchronized.
4. ArrayDeque class is much faster than Stack and LinkedList.

1. public ArrayDeque()
This Constructor creates an empty ArrayQueue with the default initial capacity(16) elements.

2.public ArrayDeque(int numberOfElements)
This Constructor creates an empty ArrayDeque which holds a specified number of elements.

3. public PriorityQueue(Collection c)
This constructor is used to create an ArrayDeque that containing all the elements of the specified collection.

ArrayQueue class hierarchy
public class java.util.ArrayDeque extends java.util.AbstractCollection implements java.util.Deque, java.lang.Cloneable,