Remove() Method : Java.util.ArrayDeque

   

Declaration :

Explanation :

Purpose The java.util.ArrayDeque.remove() method retrieves and removes the head of the queue represented by this deque.
Parameters NA
Return Value This method returns the head of the queue represented by this deque.
Exception NoSuchElementException — if this deque is empty.

Java Program : Example

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

Output of Program :