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

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