GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — ArrayDeque element() Method in Java - GeeksforGeeks ArrayDeque element() Method in JavaLast Updated : 10 Dec, 2018 The java.util.ArrayDeque.element() method in Java is used to retrieve or fetch the head of the ArrayDeque. In the process, the method does not delete the element from the deque instead it just returns the element.
Syntax:
Array_Deque.element()Parameters: The method does not take any parameter. Return Value: The method returns the element present at the head of the Deque. Below programs illustrate the Java.util.ArrayDeque.element() method: Program 1:
Output:
Program 2:
ArrayDeque: [Welcome, To, Geeks, 4, Geeks] The head element is: Welcome
Output:
ArrayDeque: [10, 15, 30, 20, 5] The head element is: 10 Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |