title: Java multi-dimensional arrays - a question about system output
body: <p>Would anyone please explain the output showm at the bottom for this code.  I am somewhat confused about this part and understanding what is stored in doc after execution...<br>
  doc[a][b] = a + b;  </p>
  
  <pre><code>public class doc  
  {  
      public static void main(String[] args)  
      {  
          int b = 0;  
          int [][] doc = new int [3][3];  
          int a;  
          while (b&lt;3)  
          {  
              for(a=2; a &gt;=0; a--)  
              doc[a][b] = a + b;  
              ++b;  
          }  
          int j;  
          for (int i=0; i&lt;doc.length; i++) {  
              for (j=0; j&lt;doc[i].length; j++) {  
                  System.out.println(" " + doc[i][j]);            }  
              System.out.println("");  
          }  
  
  
      }  
  }  
  </code></pre>
  
  <p>0<br>
  1<br>
  2  </p>
  
  <p>1<br>
  2<br>
  3  </p>
  
  <p>2<br>
  3<br>
  4  </p>
  
  <p>The output is above.<br>
  Thank you.  </p>