java code to copy an array to arraylist code example Example: Create ArrayList from array java new ArrayList<>(Arrays.asList(array));