### Question:
ArrayRingBuffer extends AbstractBoundedQueue<T> implements Iterable<T> { @Override public Iterator<T> iterator() { return new BufferIterator(); } ArrayRingBuffer(int capacity); @Override Iterator<T> iterator(); @Override void enqueue(T x); @Override T dequeue(); @Override T peek();  }### Answer:
@Test public void testIterator() { BoundedQueue<Integer> arb = new ArrayRingBuffer<>(10); for (int i = 0; i < arb.capacity(); i += 1) { arb.enqueue(i * 2); } for (int x : arb) { for (int y : arb) { System.out.println("x: " + x + "; y: " + y); } } }