how to convert a list to arraylist in java code example Example: array to arraylist new ArrayList<>(Arrays.asList(array));