title: Array Index out of range exception
body: <p>I want to print out the elements of this multidimensional array but I get the index out of range error. </p>
  
  <pre><code>public class test {
      public static void main(String[] args) {
          int array1[][]={{1,2,3,4},{5},{6,7}};
          for (int i=0; i&lt;3;i++){
              for (int j=0; j&lt;4;j++){
                  System.out.println(array1[i][j]);
              }
          }
      }
  }
  </code></pre>