package devmanuals.com; import java.util.Deque; import java.util.LinkedList; public class DequeAddElement { public static void main(String args[]) { Deque dq = new LinkedList(); System.out.println("Initially the size of dqueue is " + dq.size()); System.out.println("Elements in dqueue : " + dq); dq.add(11); dq.add(12); System.out .println("After addition of elements into dqueue, the elements are :" + dq); System.out.println("And the size of dqueue : " + dq.size()); System.out.println("Now insert a new element '13'"); dq.add(13); System.out.println("Then the new Elements of dqueue are : " + dq); System.out.println("And the size of new dqueue = " + dq.size()); } }