Online Java Compiler By
JavaTpoint.com
import java.util.ArrayDeque; import java.util.Deque; public class JavaDequeremoveExample_3 { public static void main(String[] args) { Deque
deque = new ArrayDeque<>(); deque.add(67l); deque.add(77l); deque.add(50l); deque.add(22l); Boolean val = deque.remove(77l); System.out.println("The long value is present in the deque : "+val); System.out.println("The remaining deque is given as :"); for (Long long1 : deque) { System.out.println(long1); } } }
Output