java how to add element to arraylist of arrays code example Example: Create ArrayList from array java new ArrayList<>(Arrays.asList(array));