how to modify an array to arraylist in java without adding code code example Example: Create ArrayList from array java new ArrayList<>(Arrays.asList(array))