Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequePollExample2 { public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); deque.add(15023001); deque.add(15023002); deque.add(15023003); deque.add(15023005); deque.add(15023007); deque.add(15023011); System.out.println("Deque before using poll() method : " +deque +"\n"); System.out.println("Head of Deque is: "+deque.poll() +"\n"); System.out.println("Deque after using poll() method : " +deque); } }
Output