How do I create an array/list (fixed size) where each element is an arraylist of integers (size undetermined)? [duplicate]

This question already has an answer here:

How to create an 2D ArrayList in java? [duplicate]

5 answers

I can't be specific unfortunately as it's for uni but I want to create an array or a list (whatever is best) where I know the size of it and this array/list will store an array list for each element. So for instance if I was to see what element 1 of an array stored and this element stored an array list of integers: 1, 5 & 6, I would like it to return 1,...

Read More »

By: StackOverFlow - 5 days ago

Related Posts