Why we have to create temp object named start in the linked list when we have initially created a const object named next in the Node class?
It seems the static main function is creating confusion here: it is a static method that runs when there is no Node instance yet. This function starts with nothing.
It creates a first node instance with new Node(22). Obviously that new node reference needs to be maintained somehow, otherwise it will be lost. That is why it is assigned to a local variable start. This is not really a "temporary" variable. It is the first (and so far: the only) node of a list.
The next property of that node instance will initially be null, which means there is no second node yet in that list. You can picture it as follows:
start
↓
┌────────────┐
│ data: 22 │
│ next: null │
└────────────┘
The program then continues to create a second node, with new Node(33):
start returned from new Node(22)
↓ ↓
┌────────────┐ ┌────────────┐
│ data: 22 │ │ data: 33 │
│ next: null │ │ next: null │
└────────────┘ └────────────┘
Again that new node reference needs to be stored somewhere. As we apparently want to create a list with two nodes, we should append this new node to the one we created earlier. And so we assign that to start.next. This results in this situation:
start
↓
┌────────────┐ ┌────────────┐
│ data: 22 │ │ data: 22 │
│ next: ────────> │ next: null │
└────────────┘ └────────────┘
But you still need start, otherwise these node instances are lost. So start is not temporary at all. It is the reference we need to access the first node in the linked list, and from there we can access the nodes the follow it, using the next reference.
The static main function is not really related with the Node class, and I think that brought confusion. It is a method that would normally be placed in another class. It runs when there is no instance of Nodeyet. It needs to create node instances to build a linked list. The next property serves to link individual nodes together, but the very first node reference will need to be stored in some variable. That is the role of start.