Using ArrayList<int>

Just a little bonus - arrays of primitive values are objects so
ArrayList<int[]> list;
is also OK :smile:

1 Like