frontwhere items are removedmay also be called the head we'll use the terms insertremovefrontand rear insert by repeatedly pressing the ins button in the queue workshop appletyou can insert new item after the first pressyou're prompted to enter key value for new item into the number text fieldthis should be number from to subsequent presses will insert an item with this key at the rear of the queue and increment the rear arrow so it points to the new item remove similarlyyou can remove the item at the front of the queue using the rem button the person is removedthe person' value is stored in the number field (corresponding to the remove(method returning valueand the front arrow is incremented in the appletthe cell that held the deleted item is grayed to show it' gone in normal implementationit would remain in memory but would not be accessible because front had moved past it the insert and remove operations are shown in figure unlike the situation in stackthe items in queue don' always extend all the way down to index in the array once some items are removedfront will point at cell with higher indexas shown in figure figure operation of the queue class methods notice that in this figure front lies below rear in the arraythat isfront has lower index as we'll see in momentthis isn' always true peek we show one other queue operationpeek this finds the value of the item at the front of the queue without removing the item (like insert and removepeek when applied to queue is also called by variety of other names if you press the peek buttonyou'll see the value at front transferred to the number box the queue is unchanged