java code to print arraylist elements code example Example: displaying an arraylist in java Arrays.toString(list.toArray())