【发布时间】:2015-11-13 06:40:25
【问题描述】:
我正在尝试使用多维数组来实现邻接矩阵,但是当我编写 for 循环时,我在 Eclipse 中不断出现错误,谁能告诉我我做错了什么。
public class Graph_arr
{
int row = 6 ;
int column = 6;
int [][] member = new int [row][column];
for(int i=0 ;i < row; i ++)
{
for (int j = 0 ; j < column ;j++)
{
member[row][column]= 0;
}
}
}
【问题讨论】:
-
必须是数组indexoutofbound异常