title: How to print two dimensional array of strings as String
body: <p>I know how to do the <code>toString</code> method for one dimensional arrays of strings, but how do I print a two dimensional array? With 1D I do it this way:</p>
  
  <pre><code>public String toString() {
      StringBuffer result = new StringBuffer();
      res = this.magnitude;
  
      String separator = "";
      if (res.length &gt; 0) {
          result.append(res[0]);
          for (int i=1; i&lt;res.length; i++) {
              result.append(separator);
              result.append(res[i]);
          }
      }
  return result.toString();
  </code></pre>
  
  <p>How can I print a 2D array?</p>