title: 2D array in android
body: <p>I am trying to run this code in android using eclips IDE.</p>
  
  <hr>
  
  <pre><code>int maxrow=0;
  
  int label=10;
  
  int[][] relations=new int[500][200];
  
  make2dzero(relations,500,200); //initialized every element with 0.
  
  relations[maxrow][0]=label;
  </code></pre>
  
  <hr>
  
  <p>The last line i.e <code>relations[maxrow][0]=label;</code> is throwing an array out of bound exception. If i use <code>relations[0][0]=label;</code> then the code runs fine.
  Does any one know what is wrong with this piece of code? Thanks.</p>