Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeAddLastExample3 { public static void main(String[] args) { int capacity=4; LinkedBlockingDeque
deque = new LinkedBlockingDeque
(capacity); deque.add("Disha"); deque.add("Tanmay"); deque.add("Prachi"); deque.add("Garvit"); deque.addFirst("Dia"); System.out.println("Deque : "+deque); } }
Output