title: time complexity: google.common.base.Joiner vs String concatenation
body: <p>I know that using += on strings in loops takes O(n^2) time where n is the number of loops. But if the loop will run at most 20 times. Will that change the time complexity to O(1) ? For example,</p>
  
  <pre><code>List&lt;String&gt; strList = new ArrayList&lt;&gt;();
  //some operations to add string to strList
  for(String str : strList) appendStr += str + ","; 
  </code></pre>
  
  <p>I know that the size of strList will never exceed 20. Also each string in strList will have less than 20 characters.
  If the string concatenation in this case still has O(n^2) time complexity, would it better be to use <code>google.common.base.Joiner</code> if I want my algorithm to have a better time complexity? </p>