display the elements of a Arraylist code example Example: displaying an arraylist in java Arrays.toString(list.toArray())