Java的Vector的二维数组的定义及初始化

map=new Vector<Vector<Integer>>(m);
for(int i=0;i<m;++i) {
Vector<Integer>temp=new Vector<Integer>();
for(int j=0;j<m;++j) {
temp.add(-1);
}
map.add(temp);
}

猜你喜欢

转载自www.cnblogs.com/z2529827226/p/11620913.html