Implements Queue and Deque.
Ideal for stack structure.
All methods of the implemented interfaces are usable.
EXAMPLE FOR ARRAYDEQUE METHODS:
EXAMPLE FOR ARRAYDEQUE ITERATING:
EXAMPLE FOR USING ARRAYDEQUE AS A STACK (LIFO):
Differences between ArrayDeque and LinkedList:
Both implements Deque
LinkedList supports null elements, ArrayDeque does not
LinkedList nodes contain data plus addresses of next and prev therefore needs more memory than ArrayDeque
ArrayDeque is faster than LinkedList