ArrayList[][] grid = new ArrayList[300][150];
...
for (int a = 0; a < this.gw; a++) {
for (int b = 0; b < this.gh; b++) {
this.grid[a][b] = new ArrayList();
}
}
...
for (int a = 0; a < this.gw; a++) {
for (int b = 0; b < this.gh; b++) {
this.grid[a][b].clear();
}
}
...
ArrayList al = this.grid[c][d];
int n = al.size();
for (int q = 0; q < n; q++) {
int j = ((Integer)al.get(q)).intValue();
}