title: toString() representation output
body: <p>I have a bug in the code and believe me I've run debugging many times to find what's wrong with code but cannot understand what is wrong. I have to output the contents of 2d Arraylist. For example, if I do:</p>
  <pre><code>Board&lt;String&gt; board = new Board&lt;String&gt;(-4,1,-2,3,&quot;A&quot;); 
  System.out.println(board);
  </code></pre>
  <p>it outputs me the following:</p>
  <pre><code>   | -2| -1|  0|  1|  2|  3|
     +---+---+---+---+---+---+
  -4 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
  -3 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
  -2 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
  -1 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
   0 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
   1 |  A|  A|  A|  A|  A|  A|
     +---+---+---+---+---+---+
  </code></pre>
  <p>But when I change the fourth value, <code>3</code>, to higher number, for example, <code>4</code> (<code>(-4,1,-2,4,&quot;A&quot;)</code>), then it says:</p>
  <pre><code> java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
  </code></pre>
  <p>All of my constructors work well, and I assume the bug is in the <code>toString()</code> method. And again, I've tried to debug it several times but still cannot make my mind what can be wrong here. Could smb please help me? The error happens in this line inside <code>toString()</code> method:</p>