1. String list to array
arrayList.toArray(new String[0]);
2. String array to list
ArrayList<String> arrayList = new ArrayList<>(Arrays.asList(array));
3. Integer list to int array
arrayList.stream().mapToInt(Integer::intValue).toArray();
4. int array to Integer list
List<Integer> list = Arrays.stream(intArray).boxed().collect(Collectors.toList());
ArrayList<Integer> integerArray = (ArrayList<Integer>) Arrays.stream(intArray).boxed().collect(Collectors.toList());