title: How to link a node with a next node in Java
body: <p>I will begin by creating the head node:</p>
  
  <pre><code>Node head = new Node();
  </code></pre>
  
  <p>To link head node to the next node. I will assign to the field of type Node in node object </p>
  
  <p>The zero is to represent the number of the node. This node is number zero.</p>
  
  <pre><code>Node node = new Node(0,head);
  
  public class Node {
  
    private Object data;
    private Node next;
  
    public Node()
    {
      data = null;
      next = null;
    }
  
    public Node(Object x)
    {
      data = x;
      next = null;
    }
  
    public Node(Object x, Node nextNode)
    {
      data = x;
      next = nextNode;
    }
  }
  </code></pre>
  
  <p>Is this the proper way to link nodes together?</p>