RemoveFirstOccurrence() Method : ArrayDeque in Java

   

Declaration :

Explanation :

Purpose The java.util.ArrayDeque.removeFirstOccurrence(Object) method removes the first occurrence of the specified element in this deque.
Parameters o ===> The element whose first occurrence is to be removed from this deque if present.
Return Value This method returns true if the deque contains the specified element.
Exception NA

Java Program : Example

Below example will explain java.util.ArrayDeque.removeFirstOccurrence(o) method.

Output of Program :