title: I can't add a node into an empty list
body: <p>I stumbled upon a weird problem with adding two linked lists into a third one in Java, the first linked list "myList1", the second linked list "myList2" and the third one "myList3".</p>
  
  <p>The combining method is supposed to to add the first LinkedList "myList1" then the second "myList2" into the third LinkedList "myList3", but I faced a problem with adding them to third list while it's empty, but if the third list has at least one element every thing goes smoothly.</p>
  
  <p>The code:</p>
  
  <pre><code>Node current = myList1.head;            
  while (current != null) {                                                                       
      Node newcurrent = myList3.head;
      int h1 = current.getData();                                  
      Node newNode = new Node(h1);
      if (newcurrent == null)     
          //the problem is with this code                                             
          newcurrent = newNode;                           
      else {                                     
          if (newcurrent.getLink() == null) {
              newNode.setLink(newcurrent.getLink());                                         
              newcurrent.setLink(newNode);                                      
          } else {                                        
              Node current11 = newcurrent;                                                
              while (current11.getLink() != null) {
                  current11 = current11.getLink();
              }                       
              current11.setLink(newNode);                          
          }                                    
      }                                                           
      current = current.getLink();                            
  }
  </code></pre>
  
  <p>The node is not added to the third LinkedList if the third list is empty, and I tried many other codes but it didn't work either, but if I entered at least one element to the third LinkedList the list is added normally.</p>
  
  <p>other codes I tried :</p>
  
  <pre><code>newcurrent.setLink(newNode);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>newNode = newcurrent; 
  newcurrent = newNode;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>newNode.setLink(newcurrent); 
  newcurrent.setLink(newNode);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>newNode.link = newcurrent; 
  newcurrent.link = newNode;
  </code></pre>