OfferLast() Method : Java.util.ArrayDeque

   

Declaration :

Explanation :

Purpose The java.util.ArrayDeque.offerLast(E e) method inserts the specified element E at the end of this deque.
Parameters e ===> The element to be added at the end.
Return Value This method returns true if the element was added to this deque else false.
Exception NullPointerException — if the specified element is null.

Java Program : Example

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

Output of Program :