title: Why can't variable j initialization be in the termination expression of the for loop?
body: <pre><code>public class Gameboard
  {      
      public char[][] board;
      public static void main(String args[])
      {
          Gameboard blank = new Gameboard(false);
          System.out.println("Printing blank gameboard:\n" + blank + "\n");
      }
      public Gameboard(boolean setup)
      {
          char[][] board = new char[8][8];
          if (!setup)
          {
              for(int i = 0; i &lt; board.length;i++)
              {
                  for(int j = 0; j &lt; board[j].length;j++)//critical condition
                  {
                      board[i][j] = '-';
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I know that column length is being used not the row length but the 2d array has the same length row-wise and column-wise.</p>