Java Deque push() MethodLast Updated : 17 Mar 2025 The push() method of Deque interface is used to push an element on the stack represented by the given deque. The above method is equivalent to addFirst() method. Syntax:Parameter:The above requires only one parameter:
Throw:
Example 1Output: The final deque is given as : a b c d Example 2Output: The final deque is : [Hello, , World] Example 3Output: The resultant deque is represented as : 85 75 65 55 Next TopicJava Deque |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India