Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequePopExample2 { public static void main(String[] args) throws InterruptedException { int capacity = 5; LinkedBlockingDeque
queue = new LinkedBlockingDeque
(capacity); int val=queue.pop(); System.out.println("Head of queue : "+val); System.out.println("Elements in queue : "+queue); } }
Output