Online Java Compiler By
JavaTpoint.com
import java.util.ArrayDeque; import java.util.Deque; public class JavaDequepushExample3 { public static void main(String[] args) { Deque
deque = new ArrayDeque<>(); deque.push(55); deque.push(65); deque.push(75); deque.push(85); System.out.println("The resultant deque is represented as : "); for (Integer integer : deque) { System.out.println(integer); } } }
Output