print out a list in array code example Example: displaying an arraylist in java Arrays.toString(list.toArray())