java combine items in list into a string code example
Example 1: java list of strings to string
String string = list.stream().map(Object::toString).collect(Collectors.joining(""));
Example 2: java join list as string
List<String> list = Arrays.asList("a","b","c");
String result = String.join(",", list);
System.out.println(result); //prints a,b,c