I am trying to create an array of Arraylists in Processing/Java. I have declared it in the following way.
ArrayList[][][] arrayQ;
arrayQ = new ArrayList[90][13][18];
for (int i = 0; i < 90; i++) {
for (int j = 0; j < 13; j++) {
for (int k = 0; k < 18; k++) {
arrayQ[i][j][k] = new ArrayList<int>();
}
}
}
However, adding the <int>
inside the while loop throws an error. Unfortunately, I am programming with the Processing IDE and it doesn't give me a very good error that I can analyse to fix syntax problems.
Does this syntax seem correct?
Thanks,
Tomek
new Integer(77)
instead of theint
literal. – joschi Nov 2 '10 at 7:18