Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeGetLastExample1 { public static void main(String[] args) { int capacity = 200; LinkedBlockingDeque
lbdeque = new LinkedBlockingDeque
(capacity); lbdeque.add("Tarun"); lbdeque.add("Shweta"); lbdeque.add("Sachin"); lbdeque.add("Amit"); lbdeque.add("Yash"); lbdeque.add("Kaushal"); lbdeque.add("Yatin"); lbdeque.add("Janak"); System.out.println("Last element in the Queue is : "+lbdeque.getLast()); } }
Output