title: appending to linked list
body: <p>i was wondering how the while loop ever executes. since we set 'next' to be null when we first declare it, when does it get changed to not null? and also what does ' Node n = this; ' mean? Is that meaningful for this code? Whenever we declare a new instance of the object Node, does it make a copy of its own separate fields from the class? Thanks a bunch! I would definitely appreciate clear and easy to understand explanations. Thanks again = )</p>
  
  <pre><code>class Node {
      Node next = null;
      int data;
      public Node(int d) { data = d; }
      void appendToTail(int d) {
          Node end = new Node(d);
          Node n = this;
          while (n.next != null) { n = n.next; }
          n.next = end;
      }
  }
  </code></pre>