java list print string code example Example: how to print list contents in java System.out.println(Arrays.toString(list.toArray()));