Confused why the example code for a Doubly Linked list (Java) at times references the headNode reference variable as “this.headNode” and then at other times uses “headNode”. Also, tailNode is never referenced with “this”. See code snippet below for an example
public void insertAtHead(T data) {
Node newNode = new Node();
newNode.data = data;
newNode.nextNode = this.headNode; //Linking newNode to head's nextNode
newNode.prevNode = null; //it will be inserted at start so prevNode will be null
if (!isEmpty())
headNode.prevNode = newNode;
else
tailNode = newNode;
this.headNode = newNode;
size++;
}