java arraylist how to print out 1 of the object code example Example: print arraylist java Arrays.toString(list.toArray())