Translating the variable definition:   the head variable

  • In Java, we define the head variable as follows:

         public class Node 
         {
            int value;
            List next;
         }
      
         Node  head;     

  • In C, we define the head variable as follows:

         struct Node 
         {
            int value;
            struct Node *next;
         }
      
         struct Node  *head;     

  • The variable head is a reference variable that stores a memory address (= 4 bytes)