java list all elements in arrayList code example Example: displaying an arraylist in java Arrays.toString(list.toArray())