the front of the array now insert another item you'll see the rear arrow wrap around from index to index the new item will be inserted there this situation is shown in figure insert few more items the rear arrow moves upward as you' expect notice that after rear has wrapped aroundit' now below frontthe reverse of the original arrangement you can call this broken sequencethe items in the queue are in two different sequences in the array maxsize- front rear figure the rear arrow wraps around delete enough items so that the front arrow also wraps around now you're back to the original arrangementwith front below rear the items are in single contiguous sequence java code for queue the queue java program features queue class with insert()remove()peek()isfull()isempty()and size(methods the main(program creates queue of five cellsinserts four itemsremoves three itemsand inserts four more the sixth insertion invokes the wraparound feature all the items are then removed and displayed the output looks like this