Example usage for java.util Deque removeLastOccurrence

List of usage examples for java.util Deque removeLastOccurrence

Introduction

In this page you can find the example usage for java.util Deque removeLastOccurrence.

Prototype

boolean removeLastOccurrence(Object o);

Source Link

Document

Removes the last occurrence of the specified element from this deque.

Usage

From source file:Main.java

public static void main(String[] args) {

    Deque<Integer> deque = new ArrayDeque<Integer>(8);

    deque.add(1);//  w  ww .  ja v a2 s.  c  om
    deque.add(2);
    deque.add(3);
    deque.add(3);

    System.out.println(deque);

    deque.removeLastOccurrence(3);

    System.out.println(deque);
}