Online Java Compiler By
JavaTpoint.com
import java.util.Iterator; import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeDescendingIteratorExample1 { public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); deque.add("Reema"); deque.add("Rahul"); deque.add("Rita"); deque.add("Ramesh"); //returns an iterator over the elements in this deque in reverse sequential order Iterator it = deque.descendingIterator(); while (it.hasNext()) { System.out.println(it.next()); } } }
Output