title: Which class to use for this static method, StringBuffer or StringBuilder?
body: <p>For the following code, which class should I use in a static method, <code>StringBuilder</code> or <code>StringBuffer</code>?  Based on the API, <code>StringBuffer</code> is thread-safe, but <code>StringBuilder</code> is not. </p>
  
  <pre><code>public static String getString(int[] arrs) {
      StringBuilder sb = new StringBuilder();  //1
      StringBuffer sb = new StringBuffer();    //2
      for (int i : arrs) {
          sb.append(i);
      }
      return sb.toString();
  }
  </code></pre>