Code example for Deque

Methods: addLast

0
    public E peek() { 
        return deque.peekLast();
    } 
 
    public void push(E e) {
        deque.addLast(e);
    } 
 
    public E pop() { 
        return deque.pollLast();
    } 
 
    public int size() { 
        return deque.size();
    } 
 
 
}