how to make array list into array code example Example: array to arraylist new ArrayList<>(Arrays.asList(array));