how to get an array liost printed in java code example Example: print arraylist java Arrays.toString(list.toArray())