java print list to string code example
Example 1: java list of strings to string
String string = list.stream().map(Object::toString).collect(Collectors.joining(""));
Example 2: how to print list contents in java
System.out.println(Arrays.toString(list.toArray()));