Push() Method : Java.util.ArrayDeque

   

Declaration :

Explanation :

Purpose The java.util.ArrayDeque.push(E e) method pushes an element E onto the stack represented by this deque.
Parameters e ===> The element to be pushed in the deque.
Return Value This method does not return any value.
Exception NullPointerException — if the specified element is null.

Java Program : Example

Below example will explain java.util.ArrayDeque.push() method.

Output of Program :