Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequePopExample1 { public static void main(String[] args) { int capacity=100; LinkedBlockingDeque
deque = new LinkedBlockingDeque
(capacity); deque.add("Himanshu"); deque.add("Rahul"); deque.add("Rita"); deque.add("Ramesh"); //retrieves and removes First element of the stack String val = deque.pop(); System.out.println("First element of the deque is : "+val); System.out.println("Elements left in deque : "+deque); } }
Output