How to print values in an arrayList java code example Example: displaying an arraylist in java Arrays.toString(list.toArray())