how to display values of arraylist in java code example Example: displaying an arraylist in java Arrays.toString(list.toArray())