Deque addFirst() method in Java with Examples
The addFirst(E e) method of Deque Interface inserts the element passed in the parameter to the front of the Deque if there is space. If… Read More »
The addFirst(E e) method of Deque Interface inserts the element passed in the parameter to the front of the Deque if there is space. If… Read More »
The addAll() method of ArrayDeque is used to insert all the elements of the collection passed as parameter at the end of this ArrayDeque. For… Read More »
The removeAll() method of ArrayDeque is used to remove all the elements which is common in both ArrayDeque and the collection passed as parameter. This… Read More »
The removeIf() method of ArrayDeque is used to remove all those elements from ArrayDeque which satisfies a given predicate filter condition passed as a parameter… Read More »
The forEach() method of ArrayDeque is inherited from interface java.lang.Iterable. The operation is performed in the order of iteration if that order is specified by… Read More »
The spliterator() method of ArrayDeque returns a Spliterator of the same elements as ArrayDeque but created Spliterator is late-binding and fail-fast. A late-binding Spliterator binds… Read More »
ArrayDeque in Java provides a way to apply resizable-array in addition to the implementation of the Deque interface. It is also known as Array Double… Read More »
The java.util.ArrayDeque.toArray() method is used to form an array of the same elements as that of the Deque. Basically, the method copies all the element… Read More »
The Java.util.ArrayDeque.pop() method in Java is used to pop an element from the deque. The element is popped from the top of the deque and… Read More »
The Java.util.ArrayDeque.push(E element) method is used to push an element into the Deque. The operation is similar to the operation in the stack. The element… Read More »
The Java.util.ArrayDeque.offer(Object element) method in Java is used to add a specific element at the end of the Deque. The function is similar to the… Read More »
The Java.util.ArrayDeque.descendingIterator() method is used to return an iterator of the same elements as the ArrayDeque but in the reverse order. Syntax: Iterator iterate_value =… Read More »
The Java.util.ArrayDeque.iterator() method is used to return an iterator of the elements of the ArrayDeque. Syntax: Iterator iterate_value = Array_Deque.iterator(); Parameters: The method does not… Read More »
The java.util.ArrayDeque.peek() method in Java is used to retrieve or fetch the element at the head of the Deque. The element retrieved does not get… Read More »
The java.util.ArrayDeque.peekFirst() method in Java is used to retrieve or fetch the first element of the deque. The element retrieved does not get deleted or… Read More »