Online Java Compiler By
JavaTpoint.com
import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequePeekLastExample1 { public static void main(String[] args) { int capacity =20; LinkedBlockingDeque
deque = new LinkedBlockingDeque
(capacity); deque.add(412); deque.add(556); deque.add(654); deque.add(732); deque.add(879); deque.add(943); System.out.println("Last element of deque : "+deque.peekLast()); System.out.println("Deque after peekLast() : "+deque); } }
Output