listing stacks and queues continued long temp quearray[front++]if(front =maxsizefront return temp//public long peek(/peek at front of queue return quearray[front]//public boolean isempty(/true if queue is empty return rear+ ==front |(front+maxsize- ==rear)//public boolean isfull(/true if queue is full return rear+ ==front |(front+maxsize- ==rear)//public int size(/(assumes queue not emptyif(rear >front/contiguous sequence return rear-front+ else /broken sequence return (maxsize-front(rear+ )///end class queue notice the complexity of the isfull()isempty()and size(methods this no-count approach is seldom needed in practiceso we'll refrain from discussing it in detail efficiency of queues as with stackitems can be inserted and removed from queue in ( time