public class ArrayQueueUser // test out the ArrayQueue2 with an example queue of int values { // @SuppressWarnings("unchecked") - not needed since we are not dealing with casting or generics public static void main(String[] args) { ArrayQueue2 queue=new ArrayQueue2(6); // create a small queue to show exceptions try { for(int i=0;i<10;i++) { System.out.println("Enqueuing " + i); queue.enqueue(i); } } catch(StackFullException e) { System.out.println(e); } try { for(int i=0;i<10;i++) System.out.println(queue.dequeue()); } catch(StackEmptyException e) { System.out.println(e); } } }