Instead of
int[] list = new int[20];
can we solve this exercise using
ArrayList<Integer> list = new ArrayList<Integer>();
?