[SOLVED] Declaring an ArrayList of Arrays
Hiya, I'm making a mock cache in Java for coursework. I have managed to write a direct-mapped cache using Arrays, but I want to use ArrayLists for a fully-associative cache. I am trying to declare an Arraylist of Arrays using two int variables to assign the intial length of the arraylist (numBlocks) and the length of the arrays within it (blockSize).
This is the statement:
However when I try to compile I get the error "']' expected". It must be something to do with passing in the blockSize variable because if I remove that I can compile. I'm using BlueJ if that matters, cheers.