stacks and queues listing shows the queue java program listing the queue java program /queue java /demonstrates queue /to run this programc>java queueapp ///////////////////////////////////////////////////////////////class queue private int maxsizeprivate long[quearrayprivate int frontprivate int rearprivate int nitems//public queue(int /constructor maxsize squearray new long[maxsize]front rear - nitems //public void insert(long /put item at rear of queue if(rear =maxsize- /deal with wraparound rear - quearray[++rearj/increment rear and insert nitems++/one more item //public long remove(/take item from front of queue long temp quearray[front++]/get value and incr front if(front =maxsize/deal with wraparound front nitems--/one less item return temp//public long peekfront(/peek at front of queue