title: For loop doesn't get finished
body: <pre><code>    int length = Math.max(userOne.userName.length(), userTwo.userName.length());
      length = Math.max(length, 5);
  
      System.out.println("\nCurrent board:");
      for (int i=0; i&lt;3; i++) {
          for (int s=0; s&lt;3; s++) {
  
              String box = "empty";
              if (boxes[i][s] == 1)
                  box = userOne.userName;
              else if (boxes[i][s] == 10)
                  box = userTwo.userName;
  
              if (box.length() &lt; length) {
                  for (int j=0; j&lt;(length-box.length()); j++) {
                      box += " ";
                  }
              }
              System.out.printf("[%s]",box);
          }
          System.out.print("\n");
      }
  </code></pre>
  
  <p>The third loop <strong>for (int j=0; j&lt;(length-box.length()); j++)</strong> loops incorrect number of time!! </p>
  
  <p>For example, when it's supposed to loop 3 times, it only loops 2 times; and when it's supposed to loop 8 times, it only loops 4 times. I tried to print <strong>j</strong> and it seems that the loop never gets finished. </p>
  
  <p>I assume this has something to do with Java's synchronization, but I have no idea how to solve it!</p>