ArrayList arr_list = new ArrayList();
(add......해주기)
int[] answer = arr_list.stream().mapToInt(i -> i).toArray();