torsdag 31 maj 2012

2 dimension array

type [ ] [ ] name = new type [size][size];

int [ ] [ ] twoD = new int [2][3];

for (int i =0; i < 2; i++){
   for (int j =0; j < 3; j++){
     twoD[i][j] = 1;
}
}