Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeGetFirstExample2 { public static void main(String[] args) { int capacity = 100; LinkedBlockingDeque
lbdeque = new linkedBlockingDeque
(capacity); lbdeque.add("Joseph"); lbdeque.add("Marry"); lbdeque.add("Christiano"); lbdeque.add("Russel"); lbdeque.clear(); System.out.println("First element in the Queue is : "+lbdeque.getFirst()); } }
Output