// Contructor so set the data of this node and the next to null
 public QueueNode(T data)
 {
     this.data = data;
     next      = null;
 }
예제 #2
0
        QueueNode <T> rearNode;  // Rear node

        // Contructor setting the nodes to null.
        public Queue()
        {
            frontNode = null;
            rearNode  = null;
        }