java how to add an array to a lsit code example Example: Create ArrayList from array java new ArrayList<>(Arrays.asList(array));