Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequePollFirstExample1{ public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); deque.add("Rahim"); deque.add("Sagar"); deque.add("Tarun"); deque.add("Vibhav"); deque.add("Zarine"); deque.add("Ashwat"); System.out.println("First element of Deque is: "+deque.pollFirst() +"\n"); System.out.println("Deque after using pollFirst() method : " +deque); } }
Output