Online Java Compiler By
JavaTpoint.com
import java.util.Iterator; import java.util.concurrent.LinkedBlockingDeque; public class LinkedBlockingDequeIteratorExample2 { public static void main(String[] args) { LinkedBlockingDeque
deque = new LinkedBlockingDeque
(); for (char c = 'A'; c <= 'Z'; c++) { deque.add(c); } System.out.print("Characters : "); System.out.print("["); Iterator
iterator = deque.iterator(); while (iterator.hasNext()) { System.out.print(iterator.next()+" ,"); } System.out.println("]"); } }
Output