question on Linked List implementation concept and how it is traverse from node to node : I just started to learn the concept of Linked List recently, and having some problem on how is the else statement work in the below code? How it is traverse to next node until it found a null value in Node.next? please see the code below:

    public class LinkedList {

	Node head;
	
	public void insert(int data) {
		Node node = new Node(data);
		node.data = data;
			
		if(head == null) {
			
			head = node;
			
		}else{
			
			Node temp = head;
			while(temp.next != null) {
				temp = temp.next;
			}
			temp.next = node;
			
		}
		}
}