public class shuzu
{
/**二维数组
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
int a[][]=new int[4][6];
int i,j;
a[1][2]=1;
a[2][1]=2;
a[2][3]=3;
for(i=0;i<4;i++);
{
for(j=0;j<6;j++);
{
System.out.print(a[i][j]+" ");
}
System.out.println();
}
}
}
打印这个二维数组,总是编译不通过,问题出在System.out.print(a[i][j]+" ");
提示Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
at com.yjh.shuzu.main(shuzu.java:23)
求大神帮忙