// Contructor so set the data of this node and the next to null public QueueNode(T data) { this.data = data; next = null; }
QueueNode <T> rearNode; // Rear node // Contructor setting the nodes to null. public Queue() { frontNode = null; rearNode = null; }