how to print each arraylist code example Example: print arraylist java Arrays.toString(list.toArray())