title: toString time and space complexity
body: <p>Given the following method:</p>
  
  <pre><code>public String toString()
  {
      if (_head == null)
          return "";
      String S="";
      WordNode currentNode = _head;
      while (currentNode != null)
      {
         S+=currentNode.getWord()+" ";
         currentNode = currentNode.getNext();
      }   
      return S;
  </code></pre>
  
  <p>}</p>
  
  <p>What are time and space complexities?
  In Java, String is immutable object. How can it affect complexity?
  Thanks.</p>