I am trying to create an array of Arraylists in Java. I have declared it in the following way:
ArrayList[][][] 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 (the IDE I'm using unfortunately doesn't give me a very good error message).
What's the proper way to create an integer ArrayList?