package devmanuals.com; import java.util.Deque; import java.util.LinkedList; public class DequePush { public static void main(String args[]) { Deque dq = new LinkedList(); dq.add(10); dq.add(11); dq.add(12); System.out.println("Elements of previous deque are :" + dq); System.out.println("And the size of deque : " + dq.size()); System.out .println("Now insert a new element '9' at the front of the deque"); // This method will add the element at the front of the deque. dq.push(9); System.out.println("Then the new Elements of deque are : " + dq); System.out.println("And the size of new deque = " + dq.size()); } }